Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by pion2 · Jul 24, 2011 at 08:57 PM · c#json

C# JSON library

I am developing an app using Unity3D for desktop web browsers.

There are many .NET/C# JSON libraries listed on http://www.json.org/

What is the best C# JSON library to use in Unity3D?

Thanks in advance for your help

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by fixmax · Jan 18, 2014 at 01:22 PM

http://wiki.unity3d.com/index.php/SimpleJSON

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image W.Walter · Jan 17, 2015 at 05:15 AM 0
Share

I use this :) Works very well

avatar image
0

Answer by pion · Sep 08, 2011 at 12:06 AM

I found JSON Object C#-based library on Unity Asset Store.

It is free.

I have not used it.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by blueddarker · Jan 17, 2015 at 05:08 AM

Check this unity asset : https://www.assetstore.unity3d.com/#!/content/18457

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by angelusiones · Sep 19, 2015 at 03:32 AM

@pion2 Use this https://github.com/AngelQuirogaM/NiceJson

mod

I've updated it to support Escaping/Unescaping strings like it must do. I have seen no more problems far from that.

Thanks to @Bunny83

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Sep 21, 2015 at 05:07 PM 0
Share

It looks much better now, but it looks like it still does not unescape strings, does it? ^^

Also have you run some benchmarking in regards to garbage generation? You seem to create many new string instances. For large files your "splitting" into seperate strings can easily produce garbage that has multiple times the actual json string size.

Apart from that it looks ok now, though i haven't tested it myself. Currently i'm not that active in development ^^.

avatar image angelusiones Bunny83 · Sep 22, 2015 at 09:45 AM 0
Share

Thanks for helping me (also without being active in development ;) ). You were right, i wasn't unescaping it . But now it does. I have also put the solidus escaping opcion if someones need it. I would search to optimize it like you told me.

avatar image
0

Answer by Xarbrough · Sep 20, 2015 at 12:19 AM

I use LitJson and am happy with it. I especially wanted to write "pretty" json files which are formatted in an easy to read and editable way. Not sure which other libraries have this functionality, but after testing two, I found LitJson to look good.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Json return 405 status code when posting 1 Answer

How to write a json tree? 1 Answer

Doesn't JsonUtility support arrays with abstract type? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges