4

I'm having a strange problem with Visual Studio Code. I have the following JSON file that has a problem:

         {
             "attribute": "// numeroConta",
             "operator": "=",
             "value": 0030152201

         }

The problem is accused of "value" in the second number zero. The problem is as follows: Expected commajson (514) I found nothing in my searches. Any idea?

MatheusEdnei
  • 104
  • 1
  • 1
  • 9

1 Answers1

3

If you want to have leading 0's on the number, you will need to make is a string and enclose it in "

{
  "attribute": "// numeroConta",
  "operator": "=",
  "value": "0030152201"
}

Otherwise remove the leading 0's, leading 0's that are not directly followed by a decimal point (i.e. 0.2 is fine) are not seen as numbers in the JSON format, see the StackOverflow issue here.

Xavier
  • 1,383
  • 7
  • 6