TSUI.Data
Extends: DataAdapter
Implements: None
Exported: Yes

Associated source files:

Description

JSON Data Adapter converts a raw input string to a JavaScript object or vice-versa. Use JSONDataAdapter to handle JSON-formatted arrays/objects.
O: The output type of the adapter.

Public Methods

I2O(input: string): O
Converts raw data to JavaScript object data.Note: This implementation does handle null and undefined.Note: This implementation uses JSON.parse()
  • input: string - The raw JSON string.
  • Returns: O - The object data or null or undefined.
O2I(output: O): string
Converts JavaScript object data to raw data.Note: This implementation does handle null and undefined.Note: This implementation uses JSON.stringify()
  • output: O -
  • Returns: string - The raw JSON string.


Last edited Sep 2, 2013 at 8:26 PM by EdwardNutting, version 2

Comments

No comments yet.