ALJSONStringRepresentable Protocol Reference

Conforms to NSObject
Declared in ALJSONUtilities.h

Overview

Methods to convert an object to a JSON string

– toJSONStringPretty:error: required method

Converts the object to a JSON string.

- (NSString *_Nullable)toJSONStringPretty:(BOOL)isPretty error:(NSError **)error

Parameters

isPretty

set to true if the output string should be optimized for human-readability

error

would be set if conversion to a JSON string fails

Return Value

the JSON string

Declared In

ALJSONUtilities.h

– toJSONString: required method

Converts the object to a JSON string.

- (NSString *_Nullable)toJSONString:(NSError **)error

Parameters

error

would be set if conversion to a JSON string fails

Return Value

the JSON string

Declared In

ALJSONUtilities.h

– asJSONStringPretty: required method

Converts the object to a JSON string.

- (NSString *)asJSONStringPretty:(BOOL)isPretty

Parameters

isPretty

set to true if the output string should be optimized for human-readability

Return Value

the JSON string

Declared In

ALJSONUtilities.h

– asJSONString required method

Converts the object to a JSON string. This could fail and return a null; the result is not prettified

- (NSString *)asJSONString

Return Value

the JSON string

Declared In

ALJSONUtilities.h