Declared in DBJsonWriter.h

Tasks

  •   humanReadable

    Whether we are generating human-readable (multiline) JSON.

    Set whether or not to generate human-readable JSON. The default is NO, which produces
    JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable
    JSON with linebreaks after each array value and dictionary key/value pair, indented two
    spaces per nesting level.

    property required method
  •   sortKeys

    Whether or not to sort the dictionary keys in the output.

    If this is set to YES, the dictionary keys in the JSON output will be in sorted order.
    (This is useful if you need to compare two structures, for example.) The default is NO.

    property required method
  • – stringWithObject:

    Return JSON representation (or fragment) for the given object.

    Returns a string containing JSON representation of the passed in value, or nil on error.
    If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error.

    required method

Properties

humanReadable

Whether we are generating human-readable (multiline) JSON.

Set whether or not to generate human-readable JSON. The default is NO, which produces
JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable
JSON with linebreaks after each array value and dictionary key/value pair, indented two
spaces per nesting level.

@property BOOL humanReadable

Declared In

DBJsonWriter.h

sortKeys

Whether or not to sort the dictionary keys in the output.

If this is set to YES, the dictionary keys in the JSON output will be in sorted order.
(This is useful if you need to compare two structures, for example.) The default is NO.

@property BOOL sortKeys

Declared In

DBJsonWriter.h

Instance Methods

stringWithObject:

Return JSON representation (or fragment) for the given object.

Returns a string containing JSON representation of the passed in value, or nil on error.
If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error.

- (NSString *)stringWithObject:(id)value

Parameters

value

any instance that can be represented as a JSON fragment

Declared In

DBJsonWriter.h