From cc4d7121b38d87a1ca83cd39c1fc5aefbe35b061 Mon Sep 17 00:00:00 2001 From: Philip Cristiano Date: Wed, 29 Apr 2020 16:51:39 -0400 Subject: [PATCH] Add `with_tail` to `decode` spec `with_tail` was not defined in the spec and would fail usage of anyone using this return format --- src/jsx.erl | 2 ++ src/jsx_to_term.erl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/jsx.erl b/src/jsx.erl index 5062b02..7560b28 100644 --- a/src/jsx.erl +++ b/src/jsx.erl @@ -46,6 +46,7 @@ -ifndef(maps_support). -type json_term() :: [{binary() | atom(), json_term()}] | [{},...] | [json_term()] | [] + | {with_tail, json_term(), binary()} | true | false | null | integer() | float() | binary() | atom() @@ -55,6 +56,7 @@ -ifdef(maps_support). -type json_term() :: [{binary() | atom(), json_term()}] | [{},...] | [json_term()] | [] + | {with_tail, json_term(), binary()} | #{ binary() | atom() => json_term() } | true | false | null | integer() | float() diff --git a/src/jsx_to_term.erl b/src/jsx_to_term.erl index e4e5f5e..2f06913 100644 --- a/src/jsx_to_term.erl +++ b/src/jsx_to_term.erl @@ -47,6 +47,7 @@ -ifndef(maps_support). -type json_value() :: list(json_value()) | list({binary() | atom(), json_value()}) | [{},...] + | {with_tail, json_value(), binary()} | true | false | null @@ -58,6 +59,7 @@ -ifdef(maps_support). -type json_value() :: list(json_value()) | list({binary() | atom(), json_value()}) | [{},...] + | {with_tail, json_value(), binary()} | map() | true | false