GithubHelp home page GithubHelp logo

talentdeficit / jsx Goto Github PK

View Code? Open in Web Editor NEW
695.0 38.0 219.0 2.32 MB

an erlang application for consuming, producing and manipulating json. inspired by yajl

License: MIT License

Erlang 100.00%
erlang json

jsx's Introduction

jsx (v3.0.0)

an erlang application for consuming, producing and manipulating json. inspired by yajl

jsx is built via rebar3

current status:

jsx is released under the terms of the MIT license

copyright 2010-2016 alisdair sullivan

index

quickstart

to add to a rebar3 project

Add to rebar.config

...
{erl_opts, [debug_info]}.
{deps, [
       ...
       {jsx, "~> 3.0"}
]}.
...

to build the library and run tests

$ rebar3 compile
$ rebar3 eunit

to convert a utf8 binary containing a json string into an erlang term

1> jsx:decode(<<"{\"library\": \"jsx\", \"awesome\": true}">>, []).
#{<<"awesome">> => true,<<"library">> => <<"jsx">>}
2> jsx:decode(<<"{\"library\": \"jsx\", \"awesome\": true}">>, [{return_maps, false}]).
[{<<"library">>,<<"jsx">>},{<<"awesome">>,true}]
3> jsx:decode(<<"[\"a\",\"list\",\"of\",\"words\"]">>).
[<<"a">>, <<"list">>, <<"of">>, <<"words">>]

to convert an erlang term into a utf8 binary containing a json string

1> jsx:encode(#{<<"library">> => <<"jsx">>, <<"awesome">> => true}).
<<"{\"awesome\":true,\"library\":\"jsx\"}">>
2> jsx:encode([{<<"library">>,<<"jsx">>},{<<"awesome">>,true}]).
<<"{\"library\": \"jsx\", \"awesome\": true}">>
3> jsx:encode([<<"a">>, <<"list">>, <<"of">>, <<"words">>]).
<<"[\"a\",\"list\",\"of\",\"words\"]">>

to check if a binary or a term is valid json

1> jsx:is_json(<<"[\"this is json\"]">>).
true
2> jsx:is_json("[\"this is not\"]").
false
3> jsx:is_term([<<"this is a term">>]).
true
4> jsx:is_term([this, is, not]).
false

to minify some json

1> jsx:minify(<<"{
  \"a list\": [
    1,
    2,
    3
  ]
}">>).
<<"{\"a list\":[1,2,3]}">>

to prettify some json

1> jsx:prettify(<<"{\"a list\":[1,2,3]}">>).
<<"{
  \"a list\": [
    1,
    2,
    3
  ]
}">>

description

jsx is an erlang application for consuming, producing and manipulating json

jsx follows the json spec as closely as possible with allowances for real world usage

jsx is pragmatic. the json spec allows extensions so jsx extends the spec in a number of ways. see the section on strict in options below though

json has no official comments but this parser allows c/c++ style comments. anywhere whitespace is allowed you can insert comments (both // ... and /* ... */)

some particularly irresponsible json emitters leave trailing commas at the end of objects or arrays. jsx allows a single trailing comma in input. multiple commas in any position or a preceding comma are still errors

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 encoding. jsx replaces invalid codepoints and poorly formed sequences with the 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 javascript allows them to be delimited by single quotes (u+0027) as well. jsx follows javascript in this. strings that start with single quotes can contain double 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 ignores bad escape sequences leaving them in strings unaltered

json <-> erlang mapping

json erlang
number integer() and float()
string binary() and atom()
true, false and null true, false and null
array [] and [JSON]
object #{}, [{}] and [{binary() OR atom() OR integer(), JSON}]
see below datetime()
  • numbers

    javascript and thus json represent all numeric values with floats. there's no reason for erlang -- a language that supports arbitrarily large integers -- to restrict all numbers to the ieee754 range

    whenever possible, jsx will interpret json numbers that look like integers as integers. other numbers will be converted to erlang's floating point type, which is nearly but not quite iee754. negative zero is not representable in erlang (zero is unsigned in erlang and 0 is equivalent to -0) and will be interpreted as regular zero. numbers not representable are beyond the concern of this implementation, and will result in parsing errors

    when converting from erlang to json, floats are represented with their shortest representation that will round trip without loss of precision. this means that some floats may be superficially dissimilar (although functionally equivalent). for example, 1.0000000000000001 will be represented by 1.0

  • strings

    json strings must be unicode encoded binaries or erlang atoms. in practice, because jsx only accepts utf8 binaries all binary strings must be utf8. in addition to being unicode json strings restrict a number of codepoints and define a number of escape sequences

    json string escapes of the form \uXXXX will be converted to their equivalent codepoints during parsing. this means control characters and other codepoints disallowed by the json spec may be encountered in resulting strings. the utf8 restriction means the surrogates are explicitly disallowed. if a string contains escaped surrogates (u+d800 to u+dfff) they are interpreted but only when they form valid surrogate pairs. surrogates encountered otherwise are replaced with the replacement codepoint (u+fffd)

    all erlang strings are represented by valid utf8 encoded binaries. the encoder will check strings for conformance. badly formed utf8 sequences may be replaced with the replacement codepoint (u+fffd) according to the unicode spec

    this implementation performs no normalization on strings beyond that detailed here. be careful when comparing strings as equivalent strings may have different utf8 encodings

  • true, false and null

    the json primitives true, false and null are represented by the erlang atoms true, false and null. surprise

  • arrays

    json arrays are represented with erlang lists of json values as described in this section

  • objects

    json objects are represented by erlang maps.

  • datetime

    erlang datetime tuples ({{Year, Month, Day}, {Hour, Min, Sec}}) as returned from erlang:localtime/0 are automatically encoded as iso8601 strings and are assumed to be UTC time. no conversion is attempted of json iso8601 strings in decoded json

incomplete input

jsx can handle incomplete json texts. if the option stream is passed to the decoder or parser and if a partial json text is parsed, rather than returning a term from your callback handler, jsx returns {incomplete, F} where F is a function with an identical API to the anonymous fun returned from decoder/3, encoder/3 or parser/3. it retains the internal state of the parser at the point where input was exhausted. this allows you to parse as you stream json over a socket or file descriptor, or to parse large json texts without needing to keep them entirely in memory

however, it is important to recognize that jsx is conservative by default. jsx will not consider the parsing complete even when input is exhausted and the json text is unambiguously incomplete. to end parsing call the incomplete function with the argument end_stream (or end_json) like:

1> {incomplete, F} = jsx:decode(<<"[">>, [stream]).
{incomplete,#Fun<jsx_decoder.1.122947756>}
2> F(end_stream).  % can also be `F(end_json)`
** exception error: bad argument
3> {incomplete, G} = F(<<"]">>).
{incomplete,#Fun<jsx_decoder.1.122947756>}
4> G(end_stream).  % can also be `G(end_json)`
[]

data types

json_term()

json_term() = [json_term()]
    | [{binary() | atom() | integer(), json_term()}]
    | #{} % map of any size, not just the empty map
    | true
    | false
    | null
    | integer()
    | float()
    | binary()
    | atom()
		| datetime()

the erlang representation of json. binaries should be utf8 encoded, or close at least

json_text()

json_text() = binary()

a utf8 encoded binary containing a json string

event()

event() = start_object
    | end_object
    | start_array
    | end_array
    | {key, binary()}
    | {string, binary()}
    | {integer, integer()}
    | {float, float()}
    | {literal, true}
    | {literal, false}
    | {literal, null}
    | end_json

the subset of token() emitted by the decoder and encoder to handlers

option()

option() = dirty_strings
    | escaped_forward_slashes
    | escaped_strings
    | repeat_keys
    | stream
    | strict
    | {strict, [strict_option()]}
    | return_tail
    | uescape
    | unescaped_jsonp

strict_option() = comments
    | trailing_commas
    | utf8
    | single_quotes
    | escapes

jsx functions all take a common set of options. not all flags have meaning in all contexts, but they are always valid options. functions may have additional options beyond these. see individual function documentation for details

  • dirty_strings

    json escaping is lossy; it mutates the json string and repeated application can result in unwanted behaviour. if your strings are already escaped (or you'd like to force invalid strings into "json" you monster) use this flag to bypass escaping. this can also be used to read in really invalid json strings. everything between unescaped quotes are passed as is to the resulting string term. note that this takes precedence over any other options

  • escaped_forward_slashes

    json strings are escaped according to the json spec. this means forward slashes (solidus) are only escaped when this flag is present. otherwise they are left unescaped. you may want to use this if you are embedding json directly into a html or xml document

  • escaped_strings

    by default both the encoder and decoder return strings as utf8 binaries appropriate for use in erlang. escape sequences that were present in decoded terms are converted into the appropriate codepoint while encoded terms are unaltered. this flag escapes strings as if for output in json, removing control codes and problematic codepoints and replacing them with the appropriate escapes

  • stream

    see incomplete input

  • strict

    as mentioned earlier, jsx is pragmatic. if you're more of a json purist or you're really into bdsm stricter adherence to the spec is possible. the following restrictions are available

    • comments

      comments are disabled and result in a badarg error

    • trailing_commas

      trailing commas in an object or list result in badarg errors

    • utf8

      invalid codepoints and malformed unicode result in badarg errors

    • single_quotes

      only keys and strings delimited by double quotes (u+0022) are allowed. the single quote (u+0027) results in a badarg error

    • escapes

      escape sequences not adhering to the json spec result in a badarg error

    • control_codes

      control codes in strings result in badarg errors

    any combination of these can be passed to jsx by using {strict, [strict_option()]}. strict is equivalent to {strict, [comments, trailing_commas, utf8, single_quotes, escapes, control_codes]}

  • return_tail

    upon reaching the end of a valid json term in an input stream return the term and any remaining bytes in the input stream as {with_tail, term(), binary()} where the second member of the tuple is the json term and the third is any remaining bytes. note that leading whitespace will be stripped from the tail

  • uescape

    escape all codepoints outside the ascii range for 7 bit clean output. note this escaping takes place even if no other string escaping is requested (via escaped_strings)

  • unescaped_jsonp

    javascript interpreters treat the codepoints u+2028 and u+2029 as significant whitespace. json strings that contain either of these codepoints will be parsed incorrectly by some javascript interpreters. by default, these codepoints are escaped (to \u2028 and \u2029, respectively) to retain compatibility. this option simply removes that escaping

exports

encoder/3, decoder/3 & parser/3

decoder(Module, Args, Opts) -> Fun((JSONText) -> any())
encoder(Module, Args, Opts) -> Fun((JSONTerm) -> any())
parser(Module, Args, Opts) -> Fun((Tokens) -> any())

  Module = atom()
  Args = any()
  Opts = [option()]
  JSONText = json_text()
  JSONTerm = json_term()
  Tokens = event() | [event()]

jsx is a json compiler with interleaved tokenizing, syntactic analysis and semantic analysis stages. included are two tokenizers; one that handles json texts (decoder/3) and one that handles erlang terms (encoder/3). there is also an entry point to the syntactic analysis stage for use with user-defined tokenizers (parser/3)

all three functions return an anonymous function that takes the appropriate type of input and returns the result of performing semantic analysis, the tuple {incomplete, F} where F is a new anonymous function (see incomplete input) or a badarg error exception if syntactic analysis fails

Module is the name of the callback module

Args is any term that will be passed to Module:init/1 prior to syntactic analysis to produce an initial state

Opts are detailed here

check out callback module documentation for details of the callback module interface

decode/1,2

decode(JSON) -> Term
decode(JSON, Opts) -> Term

  JSON = json_text()
  Term = json_term()
  Opts = [option() | labels | {labels, Label} | return_maps]
    Label = binary | atom | existing_atom | attempt_atom
    F = fun((any()) -> any())

decode parses a json text (a utf8 encoded binary) and produces an erlang term

the option labels controls how keys are converted from json to erlang terms. binary (the default behavior) does no conversion beyond normal escaping. atom converts keys to erlang atoms and results in a badarg error if the keys fall outside the range of erlang atoms. existing_atom is identical to atom except it will not add new atoms to the atom table and will result in a badarg error if the atom does not exist. attempt_atom will convert keys to atoms when they exist, and leave them as binary otherwise

the option {return_maps, false} will return objects as proplists instead of maps.

raises a badarg error exception if input is not valid json

encode/1,2

encode(Term) -> JSON
encode(Term, Opts) -> JSON

  Term = json_term()
  JSON = json_text()
  Opts = [option() | space | {space, N} | indent | {indent, N}]
    N = pos_integer()

encode converts an erlang term into json text (a utf8 encoded binary)

the option {space, N} inserts N spaces after every comma and colon in your json output. space is an alias for {space, 1}. the default is {space, 0}

the option {indent, N} inserts a newline and N spaces for each level of indentation in your json output. note that this overrides spaces inserted after a comma. indent is an alias for {indent, 1}. the default is {indent, 0}

raises a badarg error exception if input is not a valid erlang representation of json

format/1,2

format(JSON) -> JSON
format(JSON, Opts) -> JSON

  JSON = json_text()
  Opts = [option() | space | {space, N} | indent | {indent, N} | {newline, LF}]
     N = pos_integer()
    LF = binary()

format parses a json text (a utf8 encoded binary) and produces a new json text according to the format rules specified by Opts

the option {space, N} inserts N spaces after every comma and colon in your json output. space is an alias for {space, 1}. the default is {space, 0}

the option {indent, N} inserts a newline and N spaces for each level of indentation in your json output. note that this overrides spaces inserted after a comma. indent is an alias for {indent, 1}. the default is {indent, 0}

the option {newline, LF} defines a custom newline symbol(s). the default is {newline, <<$\n>>}

raises a badarg error exception if input is not valid json

minify/1

minify(JSON) -> JSON

  JSON = json_text()

minify parses a json text (a utf8 encoded binary) and produces a new json text stripped of whitespace

raises a badarg error exception if input is not valid json

prettify/1

prettify(JSON) -> JSON

  JSON = json_text()

prettify parses a json text (a utf8 encoded binary) and produces a new json text equivalent to format(JSON, [{space, 1}, {indent, 2}])

raises a badarg error exception if input is not valid json

is_json/1,2

is_json(MaybeJSON) -> true | false
is_json(MaybeJSON, Opts) -> true | false

  MaybeJSON = any()
  Opts = options()

returns true if input is a valid json text, false if not

what exactly constitutes valid json may be altered

is_term/1,2

is_term(MaybeJSON) -> true | false
is_term(MaybeJSON, Opts) -> true | false

  MaybeJSON = any()
  Opts = options()

returns true if input is a valid erlang representation of json, false if not

what exactly constitutes valid json may be altered via options

callback exports

the following functions should be exported from a jsx callback module

Module:init/1

Module:init(Args) -> InitialState

  Args = any()
  InitialState = any()

whenever any of encoder/3, decoder/3 or parser/3 are called, this function is called with the Args argument provided in the calling function to obtain InitialState

Module:handle_event/2

Module:handle_event(Event, State) -> NewState

  Event = [event()]
  State = any()
  NewState = any()

semantic analysis is performed by repeatedly calling handle_event/2 with a stream of events emitted by the tokenizer and the current state. the new state returned is used as the input to the next call to handle_event/2. the following events must be handled:

  • start_object

    the start of a json object

  • '{key, binary()}'

    the key of an entry in a json object

  • end_object

    the end of a json object

  • start_array

    the start of a json array

  • end_array

    the end of a json array

  • {string, binary()}

    a json string. it will usually be a utf8 encoded binary. see the options for possible exceptions. note that keys are also json strings

  • {integer, integer()}

    an erlang integer (bignum)

  • {float, float()}

    an erlang float

  • {literal, true}

    the atom true

  • {literal, false}

    the atom false

  • {literal, null}

    the atom null

  • end_json

    this event is emitted when syntactic analysis is completed. you should do any cleanup and return the result of your semantic analysis

acknowledgements

jsx wouldn't be what it is without the contributions of Paul J. Davis, Lloyd Hilaiel, John Engelhart, Bob Ippolito, Brujo Benavides, Alex Kropivny, Steve Strong, Michael Truog, Devin Torres, fogfish, emptytea, John Daily, Ola Bäckström, Joseph Crowe, Patrick Gombert, Eshengazin S. Kuat, Max Lapshin, Bikram Chatterjee, Michael Uvarov, Led and tvv

jsx's People

Contributors

arcusfelis avatar c-bik avatar dumbbell avatar eskuat avatar etrepum avatar filmor avatar fogfish avatar g-andrade avatar getong avatar hachreak avatar jeremyjh avatar kianmeng avatar kiela avatar kpy3 avatar ledest avatar liveforeverx avatar macintux avatar maxlapshin avatar mbuhot avatar okeuday avatar patrickgombert avatar paulo-ferraz-oliveira avatar philipcristiano avatar ratopi avatar sergey-ivlev avatar srstrong avatar talentdeficit avatar tjweir avatar tsloughter avatar yjh0502 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsx's Issues

term strictness

I am using jsx as of 6234e4a and it works with term input that is not exactly strict,
for example, jsx:term_to_json(<<"a">>).

I tried upgrading to the latest version (ed33626) and it now would not accept an input that's neither a list nor a proplist.

Any plans on allowing old behaviour?

Bad argument on splitted float

Hi,

just found incorrect decoder behaviour on splitted float number:

([email protected])40> {incomplete, F} = jsx:decode(<<"{"library": "jsx", "awesome":0">>).
{incomplete,#Fun<jsx_decoder.37.8673461>}
([email protected])41> F(<<".21}">>).
** exception error: bad argument
in function jsx_decoder:maybe_done/4
called as jsx_decoder:maybe_done(<<".21}">>,
{jsx_to_term,{[[{<<"awesome">>,0},{<<"library">>,<<"jsx">>}],
[]],
{opts,binary,false}}},
[object],
{opts,false,false,false,false,false,false,false,false,false,
false})

support for `nil` atom?

Is there any chance JSX could support nil in addition to null? nil is very commonly used by Elixir to represent the nil/null value and it is always such a hassle to convert all the nils into nulls...

Jsx does not like a list of chars as the key of a map or properlist

I came up with a minimal example which shows that Jsx doesn't like strings --as a key. I would like to show first how that works for both Maps and Properlists:

>jsx:encode([{id, 1}]).
<<"{\"id\":1}">>

>jsx:encode([#{id => 1}]).
<<"[{\"id\":1}]">>

Now, with id as a string (list of integers)

> jsx:encode([{"id", 1}]).
** exception error: no function clause matching jsx_encoder:unzip([{"id",1}],jsx_encoder) (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 68)
     in function  jsx_encoder:encode_/2 (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 61)
     in call from jsx_encoder:'-encoder/3-fun-0-'/2 (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 32)

>jsx:encode([#{"id" => 1}]).
** exception error: no function clause matching jsx_encoder:unpack(#{"id" => 1},["id"],jsx_encoder) (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 81)
     in function  jsx_encoder:encode/2 (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 50)
     in call from jsx_encoder:unhitch/2 (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 74)
     in call from jsx_encoder:encode_/2 (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 63)
     in call from jsx_encoder:'-encoder/3-fun-0-'/2 (/app/_build/default/lib/jsx/src/jsx_encoder.erl, line 32)

I'm kind of new using Erlang, so I'm not sure whether this is an expected behavior or not.

Cheers,

any recent benchmark in using jsx vs jiffy?

Hi,

I am thinking to use jsx by default instead of jiffy in one project to increase its stability. To help the user choices I would like to provides an idea about the performances changes so they can do their own choice. Is there any recent benchmark and tool to do it that would allow me to compare both? I would indeed prefer to use an existing tool instead of providing my own benchmark :)

{error, badarg} instead of badarg exception wanted

Hi!

Wonder if you could adding an option to control whether decoder should throw on errors and whether to return {error, badarg} tuple.
The rationale is to save try/catch for a safe decoding.

If this is not feasible, please consider posting the code snippet on how to properly cope with all cases decoder can lead to, if one wants to safely get either a full term, or an error tuple.

TIA,
--Vladimir

representation of objects and arrays

I intersected with jsx when I was frustrated with tuple-wrapping of proplists to represent json objects, wrote my own encoder to show that it would work to unwrap the proplists, and then found jsx.

I've been very happy with jsx. It lets me deal with Erlang encoded json much more naturally. However, I'm having a problem with the representation of the empty object.

Using [{}] is great for pattern matching in the encoder, but the problem is that it is not so good if you are using list functions to analyze your json. The normal proplist destructuring pattern of {Key,Value} does not like {}. There are ways around this, but you have to wonder whether that workaround is worse than the tuple wrapping? For me, jsx is great because it allows more idiomatic processing of erlang encoded json.

Wouldn't it be nice to just use [] for the empty object?

But that is the representation of an empty Array.

Arrays with one or more elements can be differentiated from an an Object, for sure, but what about the empty case?

I thought about reducing empty array and object to an empty object, since the useful distinction between them in a json object is dubious. But assuming that this is not acceptable ...

What about using Erlang arrays for Json arrays? Or plain tuples?

Both have a useful access api, and can be easily converted to lists for mapping.

Is it really worth exposing the erlang representation at all -- maybe better to have a json access api and treat all json objects as an opaque object? Much of the api would mirror Erlang native, like map, foreach, foldl, foldr, etc. This would allow the implementation to utilize the most efficient encoding, decoding and access balance. E.g. a very large document might benefit from an efficient map implementation rather than proplist for objects, etc. I've found that when the structure is exposed inside of client code it can ease initial implementation, but have unpleasant consequences down the road (Iike refactoring all your code when you change libraries.)

Thoughts?

orddict support?

What do you think about (optionally) converting json objects into orddicts as opposed to plain proplists?

The json_term() spec is inconsistent with the README and current implementation

Therefore makes dialyzer real angry sometimes.

The call jsx:encode([{},...]) will never return since it differs in the 1st argument from the success typing arguments: ('end_stream' | 'false' | 'null' | 'true' | binary() | ['false' | 'null' | 'true' | binary() | [any()] | number() | {_,_}] | number())

And then a screen full of warnings which disappear should I comment the clause with jsx:encode([{}]).

is_json doesn't work with large files

is_json doesn't work with large files

<<"{\n "image" : "/9j/4AAQSkZJRgABAQEASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACgKADAAQAAAABAAACgAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AAEQgCgAKAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEB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kE96RTuJzSkgoGoUqRk9qkBjMVcbaJAetNOCQaXcSNtMCVCCAv40xiNxHbFSA7fnqE44PfNCATv9aT+HinnBzQPu8UxDDkj3pD6U4DnNMwTk0wBeCacMg03HelAFADvpTB1OKfyBtFRjrQAZ45o70vUYpuMCgA70tHGKUGgAxSDpjtQeRSqM8UAIaUHijHFMoAkPIqRcBMmov4MUoJC4pAKH2nJ70ZznFRU4HPFOwyRG2gk1KMA5qvnB47VJnK7jSaGhGO/5hQvLHPeheOab3zQBL0XGe9MAHIFO2Fvu9qYM52igAwVwTS+/TilXng04J3PSgZGCWwCeKdjmkC859KUkhge9AH//2Q==",\n "question" : "",\n "user" : ""\n}">>

Missing Return Type in Spec

The spec's for encode() and decode() should show all the possible error responses.

{incomplete, Fun} is one are there any others? the Docs specify thats a valid return but the -spec does not.

New tag request

Any chance of a new tag soon?
Could really use fix of #71 to finally shut up my dialyzer warnings...

PHP Url Encodes Fail

PHP json_encode escapes forward slashes. I noticed something wasn't working with a recent change in JSX.

Not sure if I need to add a jsx flag in this case for forward slash escapes or something or if I need to hack what php returns to not be stupid.

You can see the problem and my failed attempt to solve it more clearly when running the tests for

http://github.com/treetopllc/ephp

Maps get argument error in Elixir environment

I installed the 2.6.1 version from hex.pm (with Elixir's MIX tool):

~/D/p/c/riffer4 git:notifications ❯❯❯ mix deps.get ✱ ◼
Running dependency resolution
Dependency resolution completed successfully
jsx: v2.6.1

Compiled src/jsx_consult.erl (etc...)

Generated jsx.app

then load my project in iex:
~/D/p/c/riffer4 git:notifications ❯❯❯ iex -S mix ⏎ ✱ ◼

then:
iex(3)> :jsx.encode(%{"aps": %{"alert": "hi", "sound": "default"}})
** (ArgumentError) argument error
(jsx) src/jsx_parser.erl:129: :jsx_parser.value/4

this DOES work if I install jsx 2.1.1 instead...

Best,

Mike

undefined causes badarg

Hello,

A list of key/value pairs causes badarg exception if it contains an undefined value.
E.g. jsx:to_json([{key, 3},{val, undefined}]).

undefined is a common atom is Erlang to identify unset values. On JavaScript its analogy is null.
I would expect that library would understand this semantic and converts undefined into "null"

  • Dmitry

Unexpected values passed to pre_encode fun when using jsx:encode/2

When using the pre_encode option while encoding an erlang dict to a json object, I get some unexpected results. Take this example:

jsx:encode([{a,1},{b,2}], [{pre_encode, fun(X) -> io:format("~p~n", [X]), X end}]).
[{a,1},{b,2}]
{a,1}
1
2
<<"{\"a\":1,\"b\":2}">>

Why does the tuple {a,1} get passed as value, is this expected behaviour?

v2.1 is eon times slower than v1.4.5 when encoding large proplists

When encoding a ~35mb proplist using jsx:encode/1 v1.4.5 takes a couple of minutes whereas v.2.1 haven't finished after 30min.

The proplist is super simple:

[ [{<<"abcd">>, <<"1234">>}, {<<"dcba">>, <<"4321">>}]
, [{<<"abcd">>, <<"1234">>}, {<<"dcba">>, <<"4321">>}]
...
]

application config tweak

Hello,

The application cannot be started w/o nice decimal and release package cannot be created.

e.g.
application:start(jsx).
{error,{not_started,nicedecimal}}

Should the nice decimal to be treated as an optional dependencies?

  • Dmitry

Can`t encode datetime

jsx:encode([{<<"B">>,{{1999,1,8},{4,5,6.0}}}]).
** exception error: bad argument
in function jsx_parser:value/4 (src/jsx_parser.erl, line 125)

jsx:encode([{<<"B">>,erlang:localtime()}]).
** exception error: bad argument
in function jsx_parser:value/4 (src/jsx_parser.erl, line 125)

Decimal number support, or workaround

Hello,

JSX is a nice and concise library, thank you!

I would like to use the numeric format for decimal numbers, unfortunately the number representation only works with erlang floating point values.

One solution I see would be to give a binary-string representation of the decimal number, boxed in a tuplewith a special key telling JSX to format it as a number, perhaps by ways of escaping the value in a special tuple, something like:

[
    {<<"my_decimal_number">>, {'_json_number', <<"23.01">>}}
]

Of course, this also poses the problem of decoding a decimal number with JSX. Again, we could choose to box the string representation of a number so the choice to actually decode it to a float is left to the user. This process could be selected by an option...

Any ideas?

Best,
Cam

Single Quote

When I do the following I get an error, this appears to be valid json to me and the other encoders/decoders work with this.

jsx:to_term(<<"{'test':'test'}">>).

jsx seems to not like the single quote.

Implement high-level streaming API

Here's an API draft.

Creating a new stream is something gen_server-like:

{ok, Stream} = jsx_stream:init(my_callback_module, {state, initial},
       [{path, [<<"result">>,<<"items">>]}]).

Any jsx decoder options (except stream) are accepted too. User may provide multiple path options to stream multiple arrays/objects.

Feeding data

{more, Stream1} = jsx_stream:input(Stream, Data).

Callback module handles input items or key-value pairs:

-module(my_callback_module).
% called when specified path contains an array
handle_item(Path, Index, Item, RootObj, State) ->
  % Path = [<<"result">>,<<"items">>] as specified by init option
  % Index is integer item index in array, 1..Length
  % Item is actual array item — string, number, boolean, 'none', list or object
  % RootObj is root JSON object collected so far with magic 'stream' item 
  %        in place of configured stream path. E.g.
  %   RootObj = [
  %        {<<"foo">>, 1},
  %        {<<"result">>, [
  %          {<<"a">>, <<"z">>},
  %          {<<"items">>, stream}
  %          ]}
  %        ]
  {ok, State#state{last_index = Index}}.

% called for each key-value pair when path contains an object
handle_kv(Path, Key, Value, RootObj, State) ->
  {ok, State}.

Optionally callback module may emit some events:

handle_item(Path, Index, Item, RootObj, #state{last_index = 100} = State) ->
  Event = {wow, hundred, elements},
  {emit, Event, State#state{last_index = Index}};

When callback emits an event, the result of input/2 changes. User needs to input empty strings to ensure buffer is completely processed:

handle_data_from_socket(Data, Stream) ->
  case jsx_stream:input(Stream, Data) of
    {more, Stream1} ->
      {ok, Stream1};
    {emit, Event, Stream1} ->
      handle_event(Event),
      handle_data_from_socket(<<>>, Stream1)
  end.

User may perform calls to handler module:

{ItemsProcessed, Stream1} = jsx_stream:call(Stream, items_processed).

Calls are handled by callback function:

handle_call(items_processed, RootObj, #state{last_index = Index} = State) ->
  {Index, State}.

Of course, state may change when handling a call.

When JSON document ends, terminate callback is called:

terminate(end_json, RootObj, #state{last_index = Index} = State) ->
  {ok, Index}.

If the document ends before the end of data, remaining bytes are returned:

case jsx_stream:input(Stream, FinalChunk) of
  {end_json, LastIndex} ->
    {ok, LastIndex};
  {end_json, LastIndex, BytesLeft} ->
    do_something(LastIndex),
    handle_next_document(BytesLeft);
  {more, Stream1} ->
    handle_unfinished_stream(Stream1)
end.

exception when calling is_term

The following call generates the exception shown below. Since the term is not a valid json term, the call should return false.

jsx:is_term([{a,1},a]).

** exception error: function_clause
in function jsx_verify:is_term/2 (src/jsx_verify.erl, line 48)

json "unicode" vagueness

from the rfc4627:

     string = quotation-mark *char quotation-mark

     char = unescaped /
            escape ( ... )  ; uXXXX                U+XXXX

     escape = %x5C              ; \

     quotation-mark = %x22      ; "

     unescaped = %x20-21 / %x23-5B / %x5D-10FFFF

codepoints not allowed in interchange are explicitly allowed by json strings. jsx currently errors out on encountering these non-characters (unless escaped in some cases, which should also be fixed) but that might make it non-compliant? i have no idea. opening an issue so i don't forget to research it

jsx:format typesec

On jsx.erl:

-spec format(Source::json_text()) -> json_text() | {incomplete, decoder()}.
-spec format(Source::json_text(), Config::jsx_to_json:config()) -> json_text() | {incomplete, decoder()}.

format(Source) -> format(Source, []).
format(Source, Config) -> jsx_to_json:format(Source, Config).

But jsx_to_json.erl:

-spec format(Source::binary(), Config::config()) -> binary().

So, how can jsx:format(...) return {incomplete, decoder()} if jsx_to_json.format returns just binary ?

This was spotted by dialyzer while writing type spec to JSEX.

Map encoding broken

Hi,
It maybe that the merge of develop branch didn't work or something, but I got jsx 2.0, did the following line:

jsx:encode(#{<<"library">> => <<"jsx">>, <<"awesome">> => true}).

and got this

** exception error: bad argument
     in function  jsx_parser:value/4 (src/jsx_parser.erl, line 125)

It seems map support didn't make it correctly in the merge?

Thanks,

how to parse a stream

Hi, I am not sure how to parse a stream. Do you have any example. I am trying to figure how to parse such JSON on which line would be sent one by as one as chink by the server:

{listname,  [
     Line0,
     ...
     LineN
    ]
 }

Where each line is an object

 {"key": "string", "key2": integer}

Is this possible to do this with JSX? How? Are there any example around ?

failure to parse multibyte value

the following piece of JSON:

{
  "title": "\ub108 \ud558\ub098\ub9cc"
}

fails to parse:

{incomplete,#Fun<jsx_decoder.1.85838126>}

any ideas on how to make this parse correctly? i'm using the default options and the latest version (1.4.3).

How to add specific version of jsx as a dependency in rebar.

I have

{erl_opts, [debug_info]}.

{deps, [
    {protobuffs, "0.8.1", {git, "https://github.com/basho/erlang_protobuffs.git", {branch, "master"}}},
    {jsx, "1.4.3", {git, "https://github.com/talentdeficit/jsx.git", {branch, "master"}}}
]}.

{clean_files, ["*~", "**/*~", "**/*.beam"]}.

{eunit_opts, [
    verbose,
    {report, {
        eunit_surefire, [{dir,"."}]
    }}
]}.

I tried to write both V1.4.3 and 1.4.3. But have

Cloning into 'jsx'...
Checking connectivity... done
ERROR: Dependency dir c:/workspaces/event-listener/deps/jsx failed application validation with reason:
{version_mismatch,{"c:/workspaces//event-listener/deps/jsx/src/jsx.app.src",
{expected,"1.4.3"},
{has,"2.0.1"}}}.

It just always gets the last version. If only the release name would be without 'V' prefix I guess it would work.

coming changes

Not sure to understand clearly what will change in the coming release (aka master). Will it be still possible to stream JSON? What's the new API for that? An howto migrate would help :)

Weird encode issue

iex> JSEX.encode([{"userid" , "userinfo"}])
{:error,:badarg}
iex> :jsx.encode([{"userid" , "userinfo"}])
"{\"userid\":\"userinfo\"}"

Is this expected?

Convert atoms to strings

Hi!

jsx:encode([{foo, bar}]).

chokes. How do I make it (options i missed?) generate {"foo": "bar"} which seems a reasonable (to me) behavior?

TIA,
--Vladimir

How can I input UTF8 string when decoding json

Hi

I am blocked by decoding UTF8 json string, so post the issue here, and hope you can help me.
jsx decoder and encoder both works fine. Here it is:

> jsx:encode([{content, "中文"}]).
<<"{\"content\":[20013,25991]}">>
> jsx:decode(<<"{\"content\":[20013,25991]}">>).
[{< <"content">>,"中文"}]

I've read the code and did not find out where the UTF8 string is encoded. And below is my try

> A = unicode:characters_to_binary("{content: \"中文\"}").
<<"{content: \"中文\"}"/utf8>>
> jsx:decode(A).
** exception error: bad argument
     in function  jsx_decoder:object/4 (src/jsx_decoder.erl, line 262)

Can you explain me that how can I input UTF8 string?

BR
-Jack

badarg in jsx_parse

2015-09-15 05:00:47.496 [error] emulator Error in process <0.16721.423> on node '[email protected]' with exit value: {badarg,[{jsx_parser,value,4,[{file,"src/jsx_parser.erl"},{line,129}]},{lib_syslog,handle_resourcechange_log,8,[{file,"src/lib/lib_syslog.erl"},{line,759}]}]}

I got this error in the server, but not every time, jsx:encode(maps), the maps's value is integer or string or binary.

ISO8601 datetime generation in JSON

Hello,

JSX has this nice feature of being able to generate ISO8601 strings from Erlang calendar:datetime() tuples. The generated string does not include a timezone, which is a problem for us because all our datetimes are based on the UTC timezone.

On a related subject, please note that interpretation of a ISO8601 string with no timezone differs between browsers and ECMAScript versions (see here).

Would it be possible to add a "Z" at the end of the timezone writer so that it is explicitely a UTC date?

Best,
Cam

Erlang R17 has maps

Please provide some way to convert json objects into Erlang maps directly.

Please support serializing process IDs

jsx:to_json([self()]) gives error:

** exception error: bad argument
     in function  jsx_encoder:value/3
        called as jsx_encoder:value(<0.37.0>,
                                    {jsx_to_json,{[array_start],[[],<<"[">>],{opts,0,0,0}}},
                                    {opts,false,false,false,auto})
     in call from jsx_encoder:list/3 (src/jsx_encoder.erl, line 89)
     in call from jsx_encoder:start/3 (src/jsx_encoder.erl, line 53)

In a multiplayer game, I want to send process IDs from web server to browser. Process IDs are used as a way to uniquely identify players in the game. Currently, I have to manually do this:

io_lib:format("~p", [Pid])

The problem is this code is written at many places. It's very ugly. It's very sweet if jsx automatically serialize process IDs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.