fix some typos, misstatements and errors in README
This commit is contained in:
parent
4ad9c38cb9
commit
fb311b202b
1 changed files with 14 additions and 19 deletions
33
README.md
33
README.md
|
@ -3,25 +3,24 @@
|
||||||
an erlang application for consuming, producing and manipulating [json][json].
|
an erlang application for consuming, producing and manipulating [json][json].
|
||||||
inspired by [yajl][yajl]
|
inspired by [yajl][yajl]
|
||||||
|
|
||||||
**jsx** is built via [rebar][rebar] and continuous integration testing provided courtesy [travis][travis]
|
**jsx** is built via [rebar][rebar] and continuous integration testing provided courtesy [travis-ci][travis]
|
||||||
|
|
||||||
current status: [](http://travis-ci.org/talentdeficit/jsx)
|
current status: [](http://travis-ci.org/talentdeficit/jsx)
|
||||||
|
|
||||||
**jsx** is released under the terms of the [MIT][MIT] license
|
**jsx** is released under the terms of the [MIT][MIT] license
|
||||||
|
|
||||||
copyright 2010-2013 alisdair sullivan
|
copyright 2010-2014 alisdair sullivan
|
||||||
|
|
||||||
## really important note ##
|
## really important note ##
|
||||||
|
|
||||||
there are a few changes for users upgrading from 1.x. see [CHANGES.md](CHANGES.md)
|
there are a few changes for users upgrading from 1.x. see [CHANGES.md](CHANGES.md)
|
||||||
for the overview or [migrating from 1.x](#migrating) for the details. use
|
for the overview or [migrating from 1.x](#migrating) for the details
|
||||||
[master branch](https://github.com/talentdeficit/jsx/tree/master) if you want the last 1.x version
|
|
||||||
|
|
||||||
## slightly less important note ##
|
## slightly less important note ##
|
||||||
|
|
||||||
**jsx** is commited to proplists as it's object representation to the point of death.
|
**jsx** supports encoding maps to json but not decoding json to a map [jsxn][jsxn] is a
|
||||||
[jsxn][jsxn] is much more pragmatic and uses maps as it's object representation and
|
thin wrapper around **jsx** that uses maps as it's object representation if you're into
|
||||||
is otherwise identical to **jsx**
|
that
|
||||||
|
|
||||||
## index ##
|
## index ##
|
||||||
|
|
||||||
|
@ -58,11 +57,6 @@ is otherwise identical to **jsx**
|
||||||
$ rebar compile
|
$ rebar compile
|
||||||
$ rebar eunit
|
$ rebar eunit
|
||||||
```
|
```
|
||||||
or, to build using hipe
|
|
||||||
```bash
|
|
||||||
$ rebar -C hipe.cfg compile
|
|
||||||
$ rebar -C hipe.cfg eunit
|
|
||||||
```
|
|
||||||
|
|
||||||
#### to convert a utf8 binary containing a json string into an erlang term ####
|
#### to convert a utf8 binary containing a json string into an erlang term ####
|
||||||
|
|
||||||
|
@ -142,7 +136,8 @@ anywhere whitespace is allowed you can insert comments (both `// ...` and `/* ..
|
||||||
all **jsx** decoder input should be `utf8` encoded binaries. sometimes you get binaries
|
all **jsx** decoder input should be `utf8` encoded binaries. sometimes you get binaries
|
||||||
that are almost but not quite valid utf8 whether due to improper escaping or poor
|
that are almost but not quite valid utf8 whether due to improper escaping or poor
|
||||||
encoding. **jsx** replaces invalid codepoints and poorly formed sequences with the
|
encoding. **jsx** replaces invalid codepoints and poorly formed sequences with the
|
||||||
unicode replacement character (`u+FFFD`)
|
unicode replacement character (`u+FFFD`) but does it's best to return something
|
||||||
|
comprehensible
|
||||||
|
|
||||||
json only allows keys and strings to be delimited by double quotes (`u+0022`) but
|
json only allows keys and strings to be delimited by double quotes (`u+0022`) but
|
||||||
javascript allows them to be delimited by single quotes (`u+0027`) as well. **jsx**
|
javascript allows them to be delimited by single quotes (`u+0027`) as well. **jsx**
|
||||||
|
@ -150,19 +145,19 @@ follows javascript in this. strings that start with single quotes can contain do
|
||||||
quotes but must end with single quotes and must escape any single quotes they contain
|
quotes but must end with single quotes and must escape any single quotes they contain
|
||||||
|
|
||||||
json and **jsx** only recognize escape sequences as outlined in the json spec. it just
|
json and **jsx** only recognize escape sequences as outlined in the json spec. it just
|
||||||
ignores bad escape sequences
|
ignores bad escape sequences leaving them in strings unaltered
|
||||||
|
|
||||||
|
|
||||||
### migrating from 1.x ###
|
### migrating from 1.x ###
|
||||||
|
|
||||||
if you're migrating from jsx v1.x to v2 or greater in most cases you won't need to
|
if you're migrating from jsx v1.x to v2.x in most cases you won't need to
|
||||||
make any changes to your code
|
make any changes to your code
|
||||||
|
|
||||||
support for encoding otp 17.0's new map type is now enable by default when compiling
|
support for encoding otp 17.0's new map type is now enabled by default when compiling
|
||||||
via rebar for any release that supports them. jsx should still compile cleanly for
|
via rebar for any release that supports them. jsx should still compile cleanly for
|
||||||
earlier releases without any user intervention. if you'd like to disable maps (possibly
|
earlier releases without any user intervention. if you'd like to disable maps you can
|
||||||
for cross compiling to older releases) you can either set the env variable `JSX_NOMAPS` or
|
either set the env variable `JSX_NOMAPS` or by uncommenting the applicable tuple in
|
||||||
by uncommenting the applicable tuple in `rebar.config`
|
`rebar.config`
|
||||||
|
|
||||||
if you used any of `replaced_bad_utf8`, `single_quoted_strings`, `comments`,
|
if you used any of `replaced_bad_utf8`, `single_quoted_strings`, `comments`,
|
||||||
`ignored_bad_escapes` or `relax` you can simply omit them from your calls to jsx,
|
`ignored_bad_escapes` or `relax` you can simply omit them from your calls to jsx,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue