class_body
{ "{"
block_comment "/*\n * From RFC 7159, \"All Unicode characters may be placed"...
field_declaration
modifiers
private "private"
static "static"
final "final"
array_type
type_identifier "String"
dimensions
[ "["
] "]"
variable_declarator
identifier "REPLACEMENT_CHARS"
; ";"
field_declaration
modifiers
private "private"
static "static"
final "final"
array_type
type_identifier "String"
dimensions
[ "["
] "]"
variable_declarator
identifier "HTML_SAFE_REPLACEMENT_CHARS"
; ";"
static_initializer (+248 nodes collapsed)
block_comment "/** The output data, containing at most one top-level array "...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Writer"
variable_declarator
identifier "out"
; ";"
field_declaration (+21 nodes collapsed)
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "stackSize"
= "="
decimal_integer_literal "0"
; ";"
block
{ "{"
expression_statement
method_invocation
identifier "push"
argument_list
( "("
identifier "EMPTY_DOCUMENT"
) ")"
; ";"
} "}"
block_comment "/**\n * A string containing a full set of spaces for a sing"...
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "indent"
; ";"
block_comment "/**\n * The name/value separator; either \":\" or \": \".\n */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "separator"
= "="
string_literal
" "\""
string_fragment ":"
" "\""
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "lenient"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "htmlSafe"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "deferredName"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "serializeNulls"
= "="
true "true"
; ";"
block_comment "/**\n * Creates a new instance that writes a JSON-encoded s"...
constructor_declaration (+47 nodes collapsed)
block_comment "/**\n * Sets the indentation string to be repeated for each"...
method_declaration (+79 nodes collapsed)
block_comment "/**\n * Configure this writer to relax its syntax rules. By"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns true if this writer has relaxed syntax rule"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isLenient"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "lenient"
; ";"
} "}"
block_comment "/**\n * Configure this writer to emit JSON that's safe for "...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns true if this writer writes JSON that's safe"...
method_declaration
modifiers
public "public"
final "final"
boolean_type "boolean"
identifier "isHtmlSafe"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "htmlSafe"
; ";"
} "}"
block_comment "/**\n * Sets whether object members are serialized when the"...
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Returns true if object members are serialized when "...
method_declaration
modifiers
public "public"
final "final"
boolean_type "boolean"
identifier "getSerializeNulls"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "serializeNulls"
; ";"
} "}"
block_comment "/**\n * Begins encoding a new array. Each call to this meth"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Ends encoding the current array.\n *\n * @return "...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Begins encoding a new object. Each call to this met"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Ends encoding the current object.\n *\n * @return"...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Enters a new scope by appending any necessary white"...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * Closes the current scope by appending any necessary"...
method_declaration (+136 nodes collapsed)
method_declaration (+88 nodes collapsed)
block_comment "/**\n * Returns the value on the top of the stack.\n */"
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Replace the value on the top of the stack with the "...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Encodes the property name.\n *\n * @param name th"...
method_declaration (+98 nodes collapsed)
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Encodes {@code value}.\n *\n * @param value the l"...
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Writes {@code value} directly to the writer without"...
method_declaration (+65 nodes collapsed)
block_comment "/**\n * Encodes {@code null}.\n *\n * @return this writer"...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * Encodes {@code value}.\n *\n * @return this write"...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * Encodes {@code value}.\n *\n * @return this write"...
method_declaration (+76 nodes collapsed)
block_comment "/**\n * Encodes {@code value}.\n *\n * @param value a fin"...
method_declaration
modifiers
public "public"
type_identifier "JsonWriter"
identifier "value"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "value"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
expression_statement
method_invocation
identifier "writeDeferredName"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
method_invocation
identifier "Double"
. "."
identifier "isNaN"
argument_list
( "("
identifier "value"
) ")"
|| "||"
method_invocation
identifier "Double"
. "."
identifier "isInfinite"
argument_list
( "("
identifier "value"
) ")"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IllegalArgumentException"
argument_list
( "("
binary_expression
string_literal
" "\""
string_fragment "Numeric values must be finite, but was "
" "\""
+ "+"
identifier "value"
) ")"
; ";"
} "}"
expression_statement
method_invocation
identifier "beforeValue"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "out"
. "."
identifier "append"
argument_list
( "("
method_invocation
identifier "Double"
. "."
identifier "toString"
argument_list
( "("
identifier "value"
) ")"
) ")"
; ";"
return_statement
return "return"
this "this"
; ";"
} "}"
block_comment "/**\n * Encodes {@code value}.\n *\n * @return this write"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Encodes {@code value}.\n *\n * @param value a fin"...
method_declaration (+147 nodes collapsed)
block_comment "/**\n * Ensures all buffered data is written to the underly"...
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Flushes and closes this writer and the underlying {"...
method_declaration (+81 nodes collapsed)
method_declaration (+291 nodes collapsed)
method_declaration (+80 nodes collapsed)
block_comment "/**\n * Inserts any necessary separators and whitespace bef"...
method_declaration (+91 nodes collapsed)
block_comment "/**\n * Inserts any necessary separators and whitespace bef"...
method_declaration (+178 nodes collapsed)
} "}"