Skip to content

Commit 1a84831

Browse files
committed
add formatJSON and validateJSON examples
1 parent 43f7c66 commit 1a84831

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ API
9797
jsfmt.format(<javascript_string>, <config_object>) // Returns formatted JavaScript
9898
```
9999

100+
```javascript
101+
jsfmt.formatJSON(<JSON_string>, <config_object>) // Returns formatted JSON
102+
```
103+
100104
```javascript
101105
var config = jsfmt.getConfig(); // Loads the jsfmt config from the appropriate rc file or default config object
102106
```
@@ -155,6 +159,10 @@ jsfmt.search(js, "R.Component.create(a, { dependencies: z })").forEach(function(
155159
jsfmt.validate(<javascript_string>) // Returns errors found while parsing JavaScript
156160
```
157161

162+
```javascript
163+
jsfmt.validateJSON(<JSON_string>) // Returns errors found while parsing JSON
164+
```
165+
158166
#### Example
159167

160168
```javascript

0 commit comments

Comments
 (0)