Reading Json data using dlll had dictionary error, and I studied using JsonUtility


Through script, class should be identified Serializable like below:


[Serializable]            //using System must be added

class Data

{

    public string name;

    public List<string> likes;

    public int level;

}


and create a variable type of 'Data', then use JsonUtility.ToJson method to convert 'Data' type to Json like below


        var data = new Data();


        data.name = "Park";

        data.level = 10;

        data.likes = new List<string>() {

            "dog", "cat"

        };


        /*

{

    "name": "Park",

    "likes": [

        "dog",

        "cat"

    ],

    "level": 10

}

*/

        Debug.Log(JsonUtility.ToJson(data, prettyPrint: true));


Annotation in /* */ would be printed in console like below 




Thanks to: http://pjc0247.tistory.com/32

'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06
First Assignment in China  (0) 2017.01.05
Read Json file in Unity3D  (0) 2017.01.05

 ZStick is a stick that has a LED with buttons. A set of ZSticks can be used in any places where there are audiences. Through it, they can vote or do some performances as its' LED has 6 lights(RGB, CMY and White)


There is an Android App that can set 2 modes(vote or Scene). Vote mode is when users of ZSticks press one of 3 buttons, result is displayed. The other mode, Scene, is used for performance so App can control all ZStick's colors. So it can make all sticks to light same color, or select sticks and change theirs.


 So Our first task is that make a program using C/C++(Console or Window Program) or C#(Unity) to control a set of ZSticks. So we should make a program that connect with Z Sticks through network and can control or collect data from them. I think it will be really funny..!

'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06
Unity read Json data  (0) 2017.01.06
Read Json file in Unity3D  (0) 2017.01.05


Learn how to parse JSON data in Unity using C# and the LitJson library.

What is JSON?
http://json.org/

LitJson
http://lbv.github.io/litjson/

Unity DLL Manual
http://docs.unity3d.com/Manual/UsingD...

Unity Visual Studio Tools
https://www.visualstudio.com/en-us/fe...

Have a question or comment? Leave one below or hit me up on twitter at:
https://twitter.com/AwfulMedia

Alright, so this is my first video in over a year. I know it was sucky of me to just abandon the channel without explanation. I've been busier than usual and just lost interest. With that said, I want to apologize for how it went down and I hope we can put it behind us and learn how to make some awesome stuff.

출처: http://unitytutorial.tistory.com/20 [유니티 러닝 센터]


======================================================================


I've got a mission to create program (or Interface) and it need to read/write Json data file

'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06
Unity read Json data  (0) 2017.01.06
First Assignment in China  (0) 2017.01.05

+ Recent posts