Save data not valid JSON data

Discussion and help for Easy Save 3

Re: Save data not valid JSON data

Postby Joel » Fri Jul 12, 2019 5:07 pm

Hi there,

When storing Dictionaries we break the validity of JSON to improve performance and readability. To remain valid with JSON, Dictionaries would need to be represented as an array of objects with separate key/value fields, which would increase the overhead quite significantly, and is quite difficult to read.

With regards to duplicate keys, there is nothing in the standard which says that this isn't allowed (see ... -an-object). This will only be imposed by the serialiser/deserialiser you are using, and Easy Save does not impose this restriction.

Easy Save's JSON data isn't intended to be parsed by anything other than Easy Save. If you want to upload the data to a database, you should upload and store the JSON as a string, rather than trying to parse it.

All the best,
Joel Tebbett @ Moodkie Interactive
Twitter - Unity - LinkedIn
User avatar
Moodkie Staff
Posts: 2477
Joined: Wed Nov 07, 2012 10:32 pm

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests