C# 클래스 Jurassic.Library.JSONParser

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

공개 메소드들

메소드 설명
JSONParser ( ScriptEngine engine, JSONLexer lexer ) : System

Creates a JSONParser instance with the given lexer supplying the tokens.

Parse ( ) : object

Parses the JSON text (optionally applying the reviver function) and returns the resulting value.

비공개 메소드들

메소드 설명
Consume ( ) : void

Discards the current token and reads the next one.

Expect ( Jurassic.Compiler.Token token ) : void

Indicates that the next token is identical to the given one. Throws an exception if this is not the case. Consumes the token.

ExpectIdentifier ( ) : string

Indicates that the next token should be an identifier. Throws an exception if this is not the case. Consumes the token.

ParseArrayLiteral ( ) : ArrayInstance

Parses an array literal (e.g. "[1, 2]").

ParseObjectLiteral ( ) : ObjectInstance

Parses an object literal (e.g. "{a: 5}").

ParseValue ( ) : object

Parses a value.

메소드 상세

JSONParser() 공개 메소드

Creates a JSONParser instance with the given lexer supplying the tokens.
public JSONParser ( ScriptEngine engine, JSONLexer lexer ) : System
engine ScriptEngine The associated script engine.
lexer JSONLexer The lexical analyser that provides the tokens.
리턴 System

Parse() 공개 메소드

Parses the JSON text (optionally applying the reviver function) and returns the resulting value.
public Parse ( ) : object
리턴 object