Pass values as bool or number type using SimpleJSON
Hi everyone, I'm using SimpleJSON.cs in my project to parse and also to create JSON. I've recently updated to the new SimpleJSON updates (8/03 and 11/04) and I wanted to know if it's possible to pass a value, when creating the JSONObject, in values that are either booleans or int/float/double.
For instance, I'd like to be able to create a JSON like this, without escapes: {"field":{"active":true,"inactive":false}} and not like this: {"field":{"active":"True","inactive":"False"}}
The same thing goes for numbers. Is there any way? With the old script, where the class was still called JSONClass and not JSONObject I was able to do this by updating the JSONNode class by checking the string using a Regex, now I'm not able to do this, is there any way to properly expect that behaviour?
@Bunny83 I'm tagging you since you most likely know this better
Thanks in advance!
Your answer
![](https://koobas.hobune.stream/wayback/20220612122635im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
JSONUtility FromJson function causing memory access out of bounds error 0 Answers
Problem with Json and Android ! 0 Answers
How to read array json file? 0 Answers
Getting KeyNotFoundException and I can't understand why 1 Answer
What should I use, a Dictionary with 100 entries or a class with 100 variables? 0 Answers