Class JsonExtensions
Helper extensions for json parser and IOC container
Inheritance
System.Object
JsonExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Onbox.Core.V8.Json
Assembly: Onbox.Core.dll
Syntax
public static class JsonExtensions
Methods
| Improve this Doc View SourceAddJson(IContainer)
Adds JsonService with default settings for Revit: CamelCaseProperties, Ignores nulls, and Ignores Reference loop
Declaration
public static IContainer AddJson(this IContainer container)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container |
Returns
Type | Description |
---|---|
IContainer |
AddJson(IContainer, Action<JsonSerializerSettings>)
Adds JsonService with custom settings configuration
Declaration
public static IContainer AddJson(this IContainer container, Action<JsonSerializerSettings> config)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
System.Action<Newtonsoft.Json.JsonSerializerSettings> | config |
Returns
Type | Description |
---|---|
IContainer |
ConfigureJson(IContainer, Action<JsonSerializerSettings>)
Runtime configuration for custom Json Settings
Declaration
public static IContainer ConfigureJson(this IContainer container, Action<JsonSerializerSettings> config)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | |
System.Action<Newtonsoft.Json.JsonSerializerSettings> | config |
Returns
Type | Description |
---|---|
IContainer |