IT. Expert System.

Android Reference

JSONStringer


org.json

Class JSONStringer



  • public class JSONStringer
    extends Object
    Implements JSONObject.toString() and JSONArray.toString(). Most application developers should use those methods directly and disregard this API. For example:
     JSONObject object = ...
     String json = object.toString();

    Stringers only encode well-formed JSON strings. In particular:

    • The stringer must have exactly one top-level array or object.
    • Lexical scopes must be balanced: every call to array() must have a matching call to endArray() and every call to object() must have a matching call to endObject().
    • Arrays may not contain keys (property names).
    • Objects must alternate keys (property names) and values.
    • Values are inserted with either literal value calls, or by nesting arrays or objects.
    Calls that would result in a malformed JSON string will fail with a JSONException.

    This class provides no facility for pretty-printing (ie. indenting) output. To encode indented output, use JSONObject.toString(int) or JSONArray.toString(int).

    Some implementations of the API support at most 20 levels of nesting. Attempts to create more than 20 levels of nesting may fail with a JSONException.

    Each stringer may be used to encode a single top level value. Instances of this class are not thread safe. Although this class is nonfinal, it was not designed for inheritance and should not be subclassed. In particular, self-use by overrideable methods is not specified. See Effective Java Item 17, "Design and Document or inheritance or else prohibit it" for further information.



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1965 / . Delta: 0.02826 с