Newtonsoft.Json-for-Unity.Converters | Goes hand | Editor library
kandi X-RAY | Newtonsoft.Json-for-Unity.Converters Summary
kandi X-RAY | Newtonsoft.Json-for-Unity.Converters Summary
Converters of common Unity types for Newtonsoft.Json. Goes hand in hand with jilleJr/Newtonsoft.Json-for-Unity
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Newtonsoft.Json-for-Unity.Converters
Newtonsoft.Json-for-Unity.Converters Key Features
Newtonsoft.Json-for-Unity.Converters Examples and Code Snippets
Community Discussions
Trending Discussions on Newtonsoft.Json-for-Unity.Converters
QUESTION
I would like to ignore serialized private fields from json serialization, but it seems that [JsonIgnore]
works only with public
fields, it does not work with [SerializeField]
private
fields. Is there any other way to ignore those fields?
This is an example class:
...ANSWER
Answered 2022-Jan-06 at 17:13The problem is that the port of Json.NET that you are using, JilleJr Newtonsoft.Json-for-Unity.Converters, includes a custom contract resolver UnityTypeContractResolver
that includes members marked with [SerializeField]
even when also marked with [JsonIgnore]
. From the source:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Newtonsoft.Json-for-Unity.Converters
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page