Reputation: 83
I'm using SimpleJSON, and I am kinda new to json.
For some reason, no one on google mentions how to convert objects to json strings. They just all say deserialize json strings, or give you an already made json string. Even SimpleJSON's documentary doesn't mention it. Why is that?
This is my code. Does anyone know what is the code to convert stuff to a json string?
[System.Serializable]
public class Skill
{
public bool crush = false;
public bool parry = false;
public bool slam = false;
public bool magic = false;
public bool evadeUp = false;
}
public Skill[] allSkills;
Upvotes: 8
Views: 13084
Reputation: 2210
Using Newtonking's JSON parser you can drag the dll into your Plugins folder and reference it (using Newtonsoft;) from there, it's one of the best serialisers I've seen online, I highly recommend using it:
http://james.newtonking.com/json
Upvotes: 3