Roman Maksymyschyn Roman Maksymyschyn - 6 months ago 46
C# Question

How to save ParseObject to disk in .NET

I need to save a list of ParseObjects to disk in C#, and was wondering if anyone had any recommendations on how to achieve this.

I am sure that the Parse .NET SDK has a means of converting ParseObjects to/from JSON since that is the format used during transit to parse server, but I haven't been able to find any public methods to do this :(

Hopefully someone has an answer for what should be an easy question! :)


If you are using Newtonsoft You can do this

var jsonString = JsonConvert.SerializeObject(yourObject);
            using (StreamWriter writer =
            new StreamWriter("SerializedObject.json"))