@@ -13,10 +13,14 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ @class OFString; + +enum { + OF_JSON_REPRESENTATION_PRETTY = 1 +}; /*! * @brief A protocol implemented by classes that support encoding to a JSON * representation. * @@ -26,9 +30,22 @@ */ @protocol OFJSONRepresentation /*! * @brief Returns the JSON representation of the object as a string. * - * @return The JSON representation of the object as a string. + * @return The JSON representation of the object as a string */ - (OFString*)JSONRepresentation; + +/*! + * @brief Returns the JSON representation of the object as a string. + * + * @param options The options to use when creating a JSON representation.@n + * Possible values are: + * Value | Description + * --------------------------------|------------------------- + * `OF_JSON_REPRESENTATION_PRETTY` | Optimize for readability + * + * @return The JSON representation of the object as a string + */ +- (OFString*)JSONRepresentationWithOptions: (int)options; @end