Skip to content

[Bug]: Save results as JSON issues with decimal number #21343

@kzendra

Description

@kzendra

Description

When saving result of a query to JSON, decimal value gets multiplied by 100

I live in EU - regional settings have comma as a decimal separator and dot as a grouping symbol.
I have table in MSSQL db containing decimal(18,2) not null column
When I execute a query listing that column, it shows with decimal dot - probably root cause of the error.

If I save results of that query to JSON, all values are multiplied by 100 and still containing decimal dot.

Image In image, I use third button from the top on the right side to save as JSON

BugReport.json
BugReport.json is the result of the export.

Steps to Reproduce

Use EU (Slovenian) regional settings on your computer
Run a simple select query listing decimal column.
Save results as JSON

Affected Area

  • Connection dialog (SQL Server | Azure browse/Fabric browse)
  • Query editor
  • Query results panel
  • Object Explorer
  • GitHub Copilot integration
  • Preview/Edit data
  • Table Designer
  • Schema Designer
  • Schema Compare
  • Local SQL Server Container provisioning
  • SQL database in Fabric provisioning
  • DACPAC/BACPAC export/import
  • SQL Database projects
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the affected area

Export to JSON

Environment Information

VS Code 1.109.5 User setup
ms-mssql.mssql Version 1.39.0
SQL Server SQL database
Windows 11 Professional - Slovenian regional settings

Confirmation

  • I have searched existing issues and couldn't find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions