CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 05:37:10 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"c3937e809c7552979ee357613e6915d4"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=SdcDDoGymzUVPqC6YyxxfUR%2BgfQEt79r7bxlaIo35VwLqT0u3qZ0WbIF123qaxOezR6PvTvMZiAGfiY3cOS2xxf7WKTtXpvLcZu7KCp9uiwzD0r2hL7yD6pWoEv1%2FXf0aabg5UdAdyFqy7tpCW1HmqPty%2FC7oYXtuWSa9InJCtDhPZJnyXdmdryFJsm0nLIZsZpQDK4JPuz48KCHc7rv5nO1k954zsd5up%2FO4CMZsR1D6LUY2yWFTtQ5aOT50n6UOkSQ%2FtFu0F4Skqww2%2FX0mg%3D%3D--7f2X9OmMFgqMlLlJ--aV5T%2Fn%2BKFOZiwOC8iYJ3ww%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1959057663.1753594629; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 05:37:09 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 05:37:09 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 86F6:93466:1AA410:26DC67:6885BB05
Quick Guide · rpgmaker/NetJSON Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 29
Quick Guide
Rpgmaker edited this page May 18, 2021
·
11 revisions
Supported .Net Version:
3.5 - 4.x Net Framework
.Net Core (.Net Standard 1.6+)
.NET 5
Supported Types:
Tuple
Expando (4.x Net Framework)
Any IDictionary implementing IEnumerable<KeyValuePair<K,V>
- E.x ConcurrentDictionary, HashSet, Dictionary, SortedDictionary, and e.t.c
Dictionary<String, Object>
- Value(Object) supported Dictionary<string, object>, IList, Primitive Types, and Enums
Primitive Type (Including byte[], Guid, Timespan, DateTime, e.t.c)
Struct and Class (Only public properties and fields are supported)
Automatic quote detection
Support renaming property/field names used for both serialization and deserialization using [NetJSONProperty] attribute
Serialization of Type class
Supported Options:
NetJSON.DateFormat = Default | ISO | EpochTime (default: Default)
- Default: Generate the standard json date representation "\Date(value)"
- ISO: Generate iso format of date using ISO 8601 e.x 2015-07-29T14:59:08Z
- EpochTime: Generate a unix representation of the date
NetJSON.DateStringFormat = default: Null
- This allows customization of date formatting and ignore other formatting option when specified.
NetJSON.TimeZoneFormat = Unspecified | Utc | Local (default: Unspecified)
- This allows you to include the timezone information as part of serialization
NetJSON.ShareAssembly = true | false (default: true)
- This option allows NetJSON to place all types needed for serialization/deserialization in other to avoid the cost of generating multiple assemblies within the runtime
NetJSON.UseEnumString = true | false (default: false)
- It will convert enum to their string name representation rather than using the value.
NetJSON.IncludeFields = true | false (default: false)
- Include fields in serialization if value is true
NetJSON.SkipDefaultValue = true | false (default: true)
- Ignore serialization of value of primitive type and reference type therefore reducing the generated payload
- E.x. Nullable<int> will be serialize with the value of 0 if it is set. But if it is not set then it will never be serialized
NetJSON.CaseSensitive = true | false (default: true)
- Allow serialization of mix case for properties and fields if enabled
NetJSON.GenerateAssembly = true | false (default: false)
- Allow outputting the generated assembly used for serializing and deserializing the class
- Naming convention: <NameOfType>Class. E.x. Foo will become FooClass
NetJSON.QuoteType = Single | Double (default: Double)
- Determine whether to serialize json property/field using single or double quotes
NetJSON.UseStringOptimization = true | false (default: true)
- Allow NetJSON to automatically try to skip noise in json that requires reading character by character value
NetJSONSettings.Format = Default | Prettify (default: Default)
- Allow NetJSON to format the generated json in a readable format when option is Prettify
NetJSON.SerializeAs
- Allow specifying a custom delegate to determine the names to use for the field/property during serialization
NetJSON.CanSerialize
- Allow specifying a custom delegate to implement custom attribute and other features to allow additional functionality such as Ignoring fields/properties, and etc
Supported Methods:
string Serialize<T>(T value)
void Serialize<T>(T value, TextWriter writer)
- Write the result of serializing T into the specific writer object
string Serialize(Type type, object value)
string SerializeObject(object value, NetJSONSettings settings)
- Allow serialization using underlying object type of specified value
T Deserialize<T>(string value)
T Deserialize<T>(TextReader reader)
- Reads content of reader and deserialize into T object
object Deserialize(Type type, string value)
object DeserializeObject(string json)
- This method allows you to generate a recursive Dictionary<string, object> representation of the json string
GenerateTypesInto(string asmName, params Type[] types)
- This method allows you to specify a list of types you would like to serialize and deserialize and output an assembly which will contain the code that can be reference for precompile serialization code
- Using this method allow you to avoid the initial cost of generating the classes needed to serialize your objects
RegisterTypeSerializer<T>(Func<T, string> serializeFunc)
- This method allows you to register method that can be used for custom serialization of primitive type use for object type when dealing with scenario such as serializing Dictionary<string, object> or any specific object type
You can’t perform that action at this time.