remove unsightly indentation from quickstart examples

This commit is contained in:
alisdair sullivan 2012-05-17 23:07:09 -07:00
parent a2929c3108
commit d0fad06d1f

View file

@ -33,47 +33,47 @@ jsx uses [sinan][sinan] or [rebar][rebar] for it's build chain
to build the library to build the library
```bash ```bash
tanga:jsx alisdair$ sinan build tanga:jsx alisdair$ sinan build
``` ```
or or
```bash ```bash
tanga:jsx alisdair$ rebar compile tanga:jsx alisdair$ rebar compile
``` ```
to run tests to run tests
```bash ```bash
tanga:jsx alisdair$ sinan -r tests eunit tanga:jsx alisdair$ sinan -r tests eunit
``` ```
or or
```bash ```bash
tanga:jsx alisdair$ rebar eunit tanga:jsx alisdair$ rebar 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
```erlang ```erlang
1> jsx:to_term(<<"{\"library\": \"jsx\", \"awesome\": true}">>). 1> jsx:to_term(<<"{\"library\": \"jsx\", \"awesome\": true}">>).
[{<<"library">>,<<"jsx">>},{<<"awesome">>,true}] [{<<"library">>,<<"jsx">>},{<<"awesome">>,true}]
``` ```
to convert an erlang term into a utf8 binary containing a json string to convert an erlang term into a utf8 binary containing a json string
```erlang ```erlang
1> jsx:to_json([<<"a">>, <<"list">>, <<"of">>, <<"words">>]). 1> jsx:to_json([<<"a">>, <<"list">>, <<"of">>, <<"words">>]).
<<"[\"a\",\"list\",\"of\",\"words\"]">> <<"[\"a\",\"list\",\"of\",\"words\"]">>
``` ```
to check if a binary or a term is valid json to check if a binary or a term is valid json
```erlang ```erlang
1> jsx:is_json(<<"[1]">>). 1> jsx:is_json(<<"[1]">>).
true true
2> jsx:is_term(1). 2> jsx:is_term(1).
true true
``` ```