aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/json.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/format/json.lux')
-rw-r--r--stdlib/source/library/lux/data/format/json.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index 5dd7e9c81..5d678fb2c 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -1,6 +1,6 @@
(.module:
- {#.doc (.doc "Functionality for reading and writing values in the JSON format."
- "For more information, please see: http://www.json.org/")}
+ {#.doc (.example "Functionality for reading and writing values in the JSON format."
+ "For more information, please see: http://www.json.org/")}
[library
[lux #*
["." meta (#+ monad)]
@@ -11,19 +11,19 @@
["." monad (#+ do)]]
[control
pipe
+ ["." maybe]
["." try (#+ Try)]
["<>" parser ("#\." monad)
["<.>" text (#+ Parser)]]]
[data
["." bit]
- ["." maybe]
["." product]
["." text ("#\." equivalence monoid)]
[collection
["." list ("#\." fold functor)]
["." row (#+ Row row) ("#\." monad)]
["." dictionary (#+ Dictionary)]]]
- [macro (#+ with_gensyms)
+ [macro
[syntax (#+ syntax:)]
["." code]]
[math
@@ -67,14 +67,14 @@
(|>> (dictionary.of_list text.hash) #..Object))
(syntax: .public (json token)
- {#.doc (doc "A simple way to produce JSON literals."
- (json #null)
- (json #1)
- (json +123.456)
- (json "this is a string")
- (json ["this" "is" "an" "array"])
- (json {"this" "is"
- "an" "object"}))}
+ {#.doc (example "A simple way to produce JSON literals."
+ (json #null)
+ (json #1)
+ (json +123.456)
+ (json "this is a string")
+ (json ["this" "is" "an" "array"])
+ (json {"this" "is"
+ "an" "object"}))}
(let [(^open ".") ..monad
wrapper (function (_ x) (` (..json (~ x))))]
(case token
@@ -420,4 +420,4 @@
(Codec Text JSON)
(def: encode ..format)
- (def: decode (<text>.run json_parser)))
+ (def: decode (<text>.result json_parser)))