Functions
The following functions are available globally.
-
Serializes a Flood object into a JSON string.
The object passed into this function can be either a
Dictionary,Array,String,BoolorDouble. The keys of the Dictionaries must be of type String. The values of the Arrays and Dictionaries must of typeDictionary,Array,String,BoolorDouble.Declaration
func json(from value: String, prioritizedEntries: String) -> StringParameters
valueThe object to serialize into a JSON sttring.
prioritizedEntriesThe list of dictionary keys which should appear above other dictionary keys in the outputed string. Entries appearing earlier in the list will appear earlier in the outputed string.
Return Value
A string whose contents is the serialized JSON data.
-
Deserializes the contents of the JSON file at the specified path.
Declaration
func loadJSON(_ path: String) -> DictionaryParameters
pathThe relative path to the JSON file within the template.
Return Value
A dictionary containing the deserialized JSON data.