ObjFW
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
<OFJSONRepresentation> Protocol Reference

A protocol implemented by classes that support encoding to a JSON representation. More...

#include <OFJSONRepresentation.h>

Inheritance diagram for <OFJSONRepresentation>:
OFArray OFDictionary OFNull OFNumber OFString OFMutableArray OFMutableDictionary OTOrderedDictionary OFConstantString OFMutableString

Instance Methods

(OFString *) - JSONRepresentationWithOptions:
 Returns the JSON representation of the object as a string.
 

Properties

OFStringJSONRepresentation
 The JSON representation of the object as a string.
 

Detailed Description

A protocol implemented by classes that support encoding to a JSON representation.

OFJSONRepresentation.h ObjFW/OFJSONRepresentation.h

Warning
Although this method can be called directly on classes other than OFArray and OFDictionary, this will generate invalid JSON, as JSON requires all data to be encapsulated in an array or a dictionary!

Method Documentation

◆ JSONRepresentationWithOptions:

- (OFString *) JSONRepresentationWithOptions: (OFJSONRepresentationOptions) options

Returns the JSON representation of the object as a string.

Parameters
optionsThe options to use when creating a JSON representation
Returns
The JSON representation of the object as a string

The documentation for this protocol was generated from the following file: