JSON::Lexer (Class)

In: json/lexer.rb
Parent: Object

Methods

back   each   more?   new   nextchar   nextchars   nextclean   nextmatch   nextstring   nextto   nextvalue   skippast   skipto   unescape   utf8str  

Public Class methods

This method will initialize the lexer to contain a string.

Parameters
s:the string to initialize the lexer object with

Public Instance methods

Backs up the lexer status one character.

Consumes the next character.

Read the next n characters from the string in the lexer.

Parameters
n:the number of characters to read from the lexer

Read the next n characters from the string with escape sequence processing.

Consumes the next character and check that it matches a specified character.

Reads the next string, given a quote character (usually ’ or ")

Parameters

quot: the next matching quote character to use

Reads the next group of characters that match a regular expresion.

Reads the next value from the string. This can return either a string, a FixNum, a floating point value, a JSON array, or a JSON object.

Skip past the next instance of the character specified

Parameters
to:the character to skip past

Skip to the next instance of the character specified

Parameters
to:Character to skip to

Given a Unicode code point, return a string giving its UTF-8 representation based on RFC 2279.

[Validate]