confit.utils.xjson
Reference
A path reference to a value in the configuration.
Source code in confit/utils/xjson.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
__init__(value)
PARAMETER | DESCRIPTION |
---|---|
value |
The path to the value in the configuration.
TYPE:
|
Source code in confit/utils/xjson.py
12 13 14 15 16 17 18 19 |
|
XJsonTransformer
Bases: Transformer
A Lark transformer to parse extended JSON.
Source code in confit/utils/xjson.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
__init__(input_string)
PARAMETER | DESCRIPTION |
---|---|
input_string |
The input string to parse.
TYPE:
|
Source code in confit/utils/xjson.py
86 87 88 89 90 91 92 93 94 |
|
string(s)
Parse string
Source code in confit/utils/xjson.py
96 97 98 99 |
|
float(n)
Parse number
Source code in confit/utils/xjson.py
101 102 103 104 |
|
int(n)
Parse number
Source code in confit/utils/xjson.py
106 107 108 109 |
|
reference(tree)
Parse reference
Source code in confit/utils/xjson.py
111 112 113 114 |
|
null(_)
Parse null
Source code in confit/utils/xjson.py
121 122 123 |
|
true(_)
Parse true
Source code in confit/utils/xjson.py
125 126 127 |
|
false(_)
Parse false
Source code in confit/utils/xjson.py
129 130 131 |
|
plus_inf(_)
Parse infinity
Source code in confit/utils/xjson.py
133 134 135 |
|
minus_inf(_)
Parse -infinity
Source code in confit/utils/xjson.py
137 138 139 |
|
nan(_)
Parse nan
Source code in confit/utils/xjson.py
141 142 143 |
|
loads(s)
Load an extended JSON string into a python object. Takes care of detecting references and tuples
PARAMETER | DESCRIPTION |
---|---|
s |
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
|
Source code in confit/utils/xjson.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
|
dumps(o)
Dump a python object into an extended JSON string. Takes care of serializing references and tuples
PARAMETER | DESCRIPTION |
---|---|
o |
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
|
Source code in confit/utils/xjson.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|