C# 클래스 Jurassic.Library.JSONSerializer

Converts a value into JSON text.
파일 보기 프로젝트 열기: paulbartrum/jurassic 1 사용 예제들

공개 메소드들

메소드 설명
JSONSerializer ( ScriptEngine engine ) : System

Creates a new JSONSerializer instance with the default options.

Serialize ( object value ) : string

Serializes a value into a JSON string.

비공개 메소드들

메소드 설명
QuoteString ( string input, System result ) : void

Adds double quote characters to the start and end of the given string and converts any invalid characters into escape sequences.

SerializeArray ( ArrayInstance value, StringBuilder result ) : void

Serializes an array into a JSON string.

SerializeObject ( ObjectInstance value, StringBuilder result ) : void

Serializes an object into a JSON string.

SerializePropertyValue ( object value, StringBuilder result ) : void

Serializes a value into a JSON string. Does not serialize "undefined", check for that value before calling this method.

TransformPropertyValue ( ArrayInstance holder, uint arrayIndex ) : object

Transforms the value stored in the given object using toJSON and/or the replacer function.

TransformPropertyValue ( ObjectInstance holder, string propertyName ) : object

Transforms the value stored in the given object using toJSON and/or the replacer function.

메소드 상세

JSONSerializer() 공개 메소드

Creates a new JSONSerializer instance with the default options.
public JSONSerializer ( ScriptEngine engine ) : System
engine ScriptEngine The associated script engine.
리턴 System

Serialize() 공개 메소드

Serializes a value into a JSON string.
public Serialize ( object value ) : string
value object The value to serialize.
리턴 string