Closed LukAss741 closed 4 years ago
fastJSON
reads strings as string
and numbers as long
or decimal
if it has a point or not.
AutoConvertStringToNumbers= false
only works when trying to put the values into an object, not when reading the json into an internal dictionary before processing.
Is there any way to disable automatic parsing values? I need everything to be kept as string. I tried AutoConvertStringToNumbers = false but it has not effect for me. In my use case I dynamically parse jsons from different sources with different structures. Hence I parse it to Dictionary<string, object>.
this code:
outputs:
so for System.Int64
decimal value = decimal.Parse((string)item.Value)
is not possible.I would like output to be:
so I can be sure all values are string and decide myself how to process it and whether or not to parse it.
This is not only case for numbers. I would like values of all kinds to be kept as strings by default.