Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 gulgi · Apr 26, 2012 at 11:30 AM · iphoneserializationjson

Serialization errors..

Hello!

We use JSON to serialize things to disk. But now we have started to get exceptions when deserializing the data.

The exception is...weird:

 System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of System.ComponentModel.Int32Converter'.
   at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0 
   at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0 
   at System.ComponentModel.TypeDescriptor.GetConverter (System.Type type) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.TypeCoercionUtility.CoerceType (System.Type targetType, System.Object value) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.ReadNumber (System.Type expectedType) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.Read (System.Type expectedType, Boolean typeIsHint) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.ReadObject (System.Type objectType) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.Read (System.Type expectedType, Boolean typeIsHint) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.Deserialize (Int32 start, System.Type type) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.Deserialize (System.String value, Int32 start, System.Type type) [0x00000] in <filename unknown>:0 
   at JsonFx.Json.JsonReader.Deserialize[CurrencyManager] (System.String value) [0x00000] in <filename unknown>:0

So...all of a sudden, JSON can not convert ints..?

Thx in advance! (btw.. not a problem in the editor, just on the iPhone)

Edit: Our "CurrencyManager" is just a class with 2 int:s in it.

Comment
Add comment · Show 4
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 Landern · Apr 26, 2012 at 02:02 PM 0
Share

Try changing the .net version in the build settings if it is set to the subset of 2.0, change it to .net 2.0, something to try at least.

avatar image gulgi · Apr 26, 2012 at 02:12 PM 0
Share

Switching to the 2.0 (not the 2.0 Subset) makes the game hang during startup. No idea why... Seems to only be able to choose: 2.0 Subset and Strip Bytecode. If anything else, the game hangs/crashes during startup.

avatar image Landern · Apr 26, 2012 at 02:17 PM 0
Share

What version of .net does this JsonFx library require?

avatar image gulgi · Apr 26, 2012 at 02:19 PM 0
Share

2.0. So that might be the problem. But I have seen a lot of posts about 3rd party serilization-libs not working. Or..strings work but nothing else.

I have switched to Xml and that seems to work. JSON would have been..nice. $$anonymous$$uch more readable if/when needed.

Thx anyhow!

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

MiniJSON Multiple Rows 1 Answer

Hashtable as object literal serialization toJSON 0 Answers

Deserializing dictionary with 'Json.Net' for Unity returns a null object. 0 Answers

Is it possible to serialize UnityEvent through reflection? 1 Answer

Serializing Custom Objects on IPhone(AoT Problem) 0 Answers


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