Reading and Writing JSON Files (C#, LitJSON) - AwfulMedia

Well, I’ve finally come out of hiding and started making videos again! If you know of my channel, great. If not, let me give you a quickie.

I do my best to produce high quality instructional videos covering various topics from Wordpress, HTML, PHP, Javascript, and my favorite: Unity. I really quite enjoy it, I just needed a break. Time just flew by and before I knew it, I was gone for an entire year.

Now that I’m back, I’m shifting my entire focus to Unity videos. I want to cover as many topics as possible so if you have any suggestions you’re welcome to drop them here or on one of the JSON videos below.

Reading JSON Data

https://www.youtube.com/watch?v=OyQQ-7-22Hw
Saving/Writing JSON Data
__**https://www.youtube.com/watch?v=IgLntR357Fc**__

Thanks for checking out AwfulMedia! If you like what you see here, be sure to check out the channel and subscribe so you don’t miss a tutorial!

5 Likes

Nice to know you are back to the world of unity video tutorials Austin

Thanks for the welcome back!

Hey Austin,

How would you make this work when your json file is in the wp-content folder of your wordpress site the Unity project you are doing it from is a webGL build on the same site?

Android devices does not read JSON file, but Unity able to read it. Why? Even i had copy the JSON file first in persistent path but still not working in mobile. Is there any need of plugin for mobile ?

This is now doable within Unity using the built in JsonUtility. Unity - Scripting API: JsonUtility

http://answers.unity3d.com/questions/1171740/android-devices-does-not-read-json-file-but-unity.html

Hi u need to Use a TextAsset Type of Text and take the Json Using Resources.Load (don’t use the extension .json only the name of document)

  • TextAsset file = Resources.Load(“yourFileName”) as TextAsset;
  • string content = file.ToString ();

Thanks for this great tutorial and your RPG tutorial :smile:. You made something that was hard to understand at first a breeze. Will be drinking one on you tonight :smile:. Can you maybe just give a short explanation on how I would go about to save and load my json files to a ftp server like byet or webhotst000 if it is at all possible…Maybe I am asking a stupid question and it cant be done from a pc platform.but been googling all day and all I could find that suited my needs was the www class,which btw only gives me errors.I am keen to learn more about this. Thanks again for your tutorials…I know it isn’t easy juggling personal life and tutorial videos

thanks,it really helpful