Class wwJsonSerializer

This class provides the ability to serialize a FoxPro value, cursor or object into a JSON string that can be passed back to a Web browser JavaScript client which can then directly evaluate the result and 'deserialize' it.

JSON stands for JavaScript Object Notation and is a string based format that is self describing in terms of types used. Each simple type is represented in a way that allows JavaScript to determine the type of the value. You can represent simple values (string, integer, bool, DateTime etc.), objects (simple object like SCATTER NAME objects or nested objects that in turn contain simple types), Arrays and Collections, and FoxPro Cursors. Cursors are represented as JavaScript object that have an array of Rows with properties for each of the fields in the cursor.

Custom
  wwJsonSerializer

Class Members

MemberDescription
Serialize Serializes a FoxPro value to a JSON string. Supports all VFP basic types, most complex objects (as long as there are no circular references), simple arrays and collections and cursors.
o.Serialize(lvValue)
PropertyExclusionList Comma delimited, lower case list of object properties that should not be serialized when serializing objects.
TrimStringValues If .T. trims all string values removing trailing spaces to minimize payload size on the wire.

Requirements

Assembly: wwjsonserializer.prg


  Last Updated: 4/30/2008 | © West Wind Technologies, 2008