JSON Encoding ViewHelper
Returns a string containing the JSON representation of the argument. The argument may be any of the following types:
- arrays, associative and traditional
- arrays containing DomainObjects
- ObjectStorage containing DomainObjects
- standard types (string, integer, boolean, float, NULL)
- DateTime including ones found as property values on DomainObjects
Recursion protection is enabled for DomainObjects with the option to add a special marker (any variable type above also supported here) which is inserted where an object which would cause recursion would be placed.
Array or Traversable
If TRUE, preserves keys from Traversables converted to arrays. Not recommended for ObjectStorages!
If FALSE, allows recursion to occur which could potentially be fatal to the output unless managed
Any value - string, integer, boolean, object or NULL - inserted instead of recursive instances of objects
A date() format for converting DateTime values to JSON-compatible values. NULL means JS UNIXTIME (time()*1000)