aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/json.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-08-08 17:56:15 -0400
committerEduardo Julian2021-08-08 17:56:15 -0400
commitf621a133e6e0a516c0586270fea8eaffb4829d82 (patch)
tree399396ee2f6a10df10cea9b78c51c76679b70e59 /stdlib/source/library/lux/data/format/json.lux
parent17e7566be51df5e428a6b10e6469201a8a9468da (diff)
No more #export magic syntax.
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 60bcfd107..3f7789e70 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -32,7 +32,7 @@
["f" frac ("#\." decimal)]]]]])
(template [<name> <type>]
- [(type: #export <name>
+ [(type: .public <name>
<type>)]
[Null Any]
@@ -41,7 +41,7 @@
[String Text]
)
-(type: #export #rec JSON
+(type: .public #rec JSON
(#Null Null)
(#Boolean Boolean)
(#Number Number)
@@ -50,23 +50,23 @@
(#Object (Dictionary String JSON)))
(template [<name> <type>]
- [(type: #export <name>
+ [(type: .public <name>
<type>)]
[Array (Row JSON)]
[Object (Dictionary String JSON)]
)
-(def: #export null?
+(def: .public null?
(Predicate JSON)
(|>> (case> #Null true
_ false)))
-(def: #export object
+(def: .public object
(-> (List [String JSON]) JSON)
(|>> (dictionary.of_list text.hash) #..Object))
-(syntax: #export (json token)
+(syntax: .public (json token)
{#.doc (doc "A simple way to produce JSON literals."
(json #null)
(json #1)
@@ -109,7 +109,7 @@
_
(in (list token)))))
-(def: #export (fields json)
+(def: .public (fields json)
{#.doc "Get all the fields in a JSON object."}
(-> JSON (Try (List String)))
(case json
@@ -119,7 +119,7 @@
_
(#try.Failure ($_ text\compose "Cannot get the fields of a non-object."))))
-(def: #export (get key json)
+(def: .public (get key json)
{#.doc "A JSON object field getter."}
(-> String JSON (Try JSON))
(case json
@@ -134,7 +134,7 @@
_
(#try.Failure ($_ text\compose "Cannot get field '" key "' on a non-object."))))
-(def: #export (set key value json)
+(def: .public (set key value json)
{#.doc "A JSON object field setter."}
(-> String JSON JSON (Try JSON))
(case json
@@ -145,7 +145,7 @@
(#try.Failure ($_ text\compose "Cannot set field '" key "' on a non-object."))))
(template [<name> <tag> <type> <desc>]
- [(def: #export (<name> key json)
+ [(def: .public (<name> key json)
{#.doc (code.text ($_ text\compose "A JSON object field getter for " <desc> "."))}
(-> Text JSON (Try <type>))
(case (get key json)
@@ -165,7 +165,7 @@
[get_object #Object Object "objects"]
)
-(implementation: #export equivalence
+(implementation: .public equivalence
(Equivalence JSON)
(def: (= x y)
@@ -273,7 +273,7 @@
(text.join_with ..value_separator)
(text.enclosed [..object_start ..object_end])))
-(def: #export (format json)
+(def: .public (format json)
(-> JSON Text)
(case json
(^template [<tag> <format>]
@@ -416,7 +416,7 @@
(array_parser json_parser)
(object_parser json_parser)))))
-(implementation: #export codec
+(implementation: .public codec
(Codec Text JSON)
(def: encode ..format)