Name | Date | Size | |
---|---|---|---|
.. | 2011-10-19 22:02:33 | 100 | |
build.array.properties | 2011-07-09 02:18:39 | 749 | |
build.array.xml | 2011-07-09 02:18:39 | 332 | |
build.base.properties | 2011-07-09 02:18:39 | 779 | |
build.base.xml | 2011-07-09 02:18:39 | 331 | |
build.json.properties | 2011-07-09 02:18:39 | 752 | |
build.json.xml | 2011-07-09 02:18:39 | 331 | |
build.text.properties | 2011-07-09 02:18:39 | 747 | |
build.text.xml | 2011-07-09 02:18:39 | 331 | |
build.xml | 2011-07-09 02:18:39 | 805 | |
build.xml.properties | 2011-07-09 02:18:39 | 745 | |
build.xml.xml | 2011-07-09 02:18:39 | 330 | |
docs | 2011-10-19 22:02:33 | 11 | |
HISTORY.md | 2011-09-27 08:41:41 | 1.8 KiB | |
js | 2011-08-20 00:27:04 | 7 | |
meta | 2011-05-27 20:45:05 | 3 | |
README.md | 2011-06-25 00:12:40 | 1,015 | |
tests | 2011-07-09 00:59:51 | 4 |
README.md
DataSchema Utility
==================
Use the DataSchema Utility to translate data in various input formats into a
standard record-based structure like this:
{
results: [
{ fieldA: valueA1, fieldB: valueB2, ... },
{ fieldA: valueA2, fieldB: valueB2, ... },
...
],
meta: {
whatever : "you",
configured: "to capture",
...
}
}
Available processors
====================
1. `Y.DataSchema.Array` - (`dataschema-array`) Input is an Array
2. `Y.DataSchema.JSON` - (`dataschema-json`) Input is an Object or JSON string
3. `Y.DataSchema.XML` - (`dataschema-xml`) Input is an XML node
4. `Y.DataSchema.Text` - (`dataschema-text`) Input is a delimited text string
The important method for each processor is the `apply(schema, data)` method, so
for example:
var results = Y.DataSchema.JSON.apply({ schema config }, dataObject);
See the user guide for details about schema definitions for each processor.