Permalink
Browse files

Update README.md

  • Loading branch information...
joelvh committed Jan 5, 2012
1 parent ac8ec97 commit 915fb156c71f727dd0cf102ec8e4482aed11d489
Showing with 13 additions and 23 deletions.
  1. +13 −23 README.md
View
@@ -1,37 +1,27 @@
+# About json2json
-## About json2json
+Transforms one JSON object structure to another structure as defined by template rules.
+Ideal for transforming JSON retrieved from web services to be used the way you need it in your application.
-This is a little utility that will transform one JSON object structure to another structure defined by a template.
-json2json is ideal for consuming JSON from a web service and transforming it into the structure your application needs it in.
-
-json2json is written in CoffeeScript, which is easily translated into JavaScript.
-It's designed to run in a Node.js environment with the CoffeeScript package installed.
-You can require json2json just like any other package.
+json2json is written in CoffeeScript and designed to run in a Node.js envirionment.
+It can be easily converted to JavaScript to be used in a browser as well.
## Template rules
-There are several template rules for transforming JSON.
-The template describes what the resulting document structure will look like.
-
-The "original JSON" is your raw data you want to transform.
-The "new JSON" is the resulting, transformed data.
-
-### Basic concepts
-
-The following description of how a template is defined incorporates the keywords used in a template:
+Template rules specify how the "original JSON" (raw data) is transformed to the "new JSON" format you need:
-A template specifies the "path" to the value on your original JSON you want to transform
+A template specifies the **path** to the value on your original JSON you want to transform
and assumes that value is either an object or an array.
-If it's an object, you can "choose" which properties you want to transform.
-If it's an array, you can "aggregate" the values you want to transform.
+If it's an object, you can **choose** which properties you want to transform.
+If it's an array, you can **aggregate** the values you want to transform.
Sometimes you want to convert an array to a map (aka JSON object).
-To do this, you can specify what value on your original JSON to use as the "key".
+To do this, you can specify what value on your original JSON to use as the **key**.
If you want to make it a really simple map,
-you can specify what value on your original JSON to use as the "value".
+you can specify what value on your original JSON to use as the **value**.
-Templates specify how the original JSON data will be represented "as" properties on the new JSON.
-(The only time the "as" rules are ignored is if the "value" rule exists
+Templates specify how the original JSON data will be represented **as** properties on the new JSON.
+(The only time the **as** rules are ignored is if the **value** rule exists
when converting an array to a map.)
### Describing the example template

0 comments on commit 915fb15

Please sign in to comment.