Browse Source

Fix outdated document

Takeru Ohta 9 years ago
parent
commit
30fc35548d
2 changed files with 4 additions and 4 deletions
  1. 2 2
      doc/jsone.md
  2. 2 2
      src/jsone.erl

+ 2 - 2
doc/jsone.md

@@ -344,10 +344,10 @@ Raises an error exception if input is not an instance of type `json_value()`
 ```
   > jsone:encode([1, null, 2]).
   <<"[1,null,2]">>
-  > jsone:encode([1, hoge, 2]).  % 'hoge' atom is not a json value
+  > jsone:encode([1, self(), 2]).  % A pid is not a json value
   ** exception error: bad argument
        in function  jsone_encode:value/3
-          called as jsone_encode:value(hoge,[{array_values,[2]}],<<"[1,">>)
+          called as jsone_encode:value(<0,34,0>,[{array_values,[2]}],<<"[1,">>)
        in call from jsone:encode/1 (src/jsone.erl, line 97)
 ```
 

+ 2 - 2
src/jsone.erl

@@ -251,10 +251,10 @@ encode(JsonValue) ->
 %% > jsone:encode([1, null, 2]).
 %% <<"[1,null,2]">>
 %%
-%% > jsone:encode([1, hoge, 2]).  % 'hoge' atom is not a json value
+%% > jsone:encode([1, self(), 2]).  % A pid is not a json value
 %% ** exception error: bad argument
 %%      in function  jsone_encode:value/3
-%%         called as jsone_encode:value(hoge,[{array_values,[2]}],<<"[1,">>)
+%%         called as jsone_encode:value(<0,34,0>,[{array_values,[2]}],<<"[1,">>)
 %%      in call from jsone:encode/1 (src/jsone.erl, line 97)
 %% '''
 -spec encode(json_value(), [encode_option()]) -> binary().