From 08673b144e86d256948ecfe73d05ec67ba8ca2b4 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Wed, 30 Oct 2013 00:57:50 +0000 Subject: [PATCH] update comments about internal rep to match reality --- src/jsx_to_json.erl | 4 +++- src/jsx_to_term.erl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jsx_to_json.erl b/src/jsx_to_json.erl index 6d8e2b8..73209eb 100644 --- a/src/jsx_to_json.erl +++ b/src/jsx_to_json.erl @@ -132,7 +132,9 @@ indent_or_space(Config) -> end. -%% internal state is a stack of in progress objects/arrays +%% internal state is a stack and a config object +%% `{Stack, Config}` +%% the stack is a list of in progress objects/arrays %% `[Current, Parent, Grandparent,...OriginalAncestor]` %% an object has the representation on the stack of %% `{object, Object}` diff --git a/src/jsx_to_term.erl b/src/jsx_to_term.erl index 36fdfd0..815da4b 100644 --- a/src/jsx_to_term.erl +++ b/src/jsx_to_term.erl @@ -101,7 +101,9 @@ format_key(Key, Config) -> end. -%% internal state is a stack of in progress objects/arrays +%% internal state is a stack and a config object +%% `{Stack, Config}` +%% the stack is a list of in progress objects/arrays %% `[Current, Parent, Grandparent,...OriginalAncestor]` %% an object has the representation on the stack of %% `{object, [{NthKey, NthValue}, {NMinus1Key, NthMinus1Value},...{FirstKey, FirstValue}]}`