Fossil SCM

Trivial doc updates to www/json-api/...

stephan 2022-04-23 16:09 trunk
Commit 73373b9d21300154efbca544d8662c53bd45a8662b55ce98d620896ff07ac381
--- www/json-api/conventions.md
+++ www/json-api/conventions.md
@@ -181,12 +181,12 @@
181181
but few, if any, use negative values).
182182
183183
**Boolean** parameters are a bit schizophrenic...
184184
185185
In **CLI mode**, boolean flags do not have a value, per se, and thus
186
-require no string-to-bool conversion. e.g. `fossil foo -aBoolOpt
187
--non-bool-opt value`.
186
+require no string-to-bool conversion. e.g.
187
+`fossil foo -aBoolOpt -non-bool-opt value`.
188188
189189
Those which arrive as strings via **GET parameters** treat any of the
190190
following as true: a string starting with a character in the set
191191
`[1-9tT]`. All other string values are considered to be false for this
192192
purpose.
193193
--- www/json-api/conventions.md
+++ www/json-api/conventions.md
@@ -181,12 +181,12 @@
181 but few, if any, use negative values).
182
183 **Boolean** parameters are a bit schizophrenic...
184
185 In **CLI mode**, boolean flags do not have a value, per se, and thus
186 require no string-to-bool conversion. e.g. `fossil foo -aBoolOpt
187 -non-bool-opt value`.
188
189 Those which arrive as strings via **GET parameters** treat any of the
190 following as true: a string starting with a character in the set
191 `[1-9tT]`. All other string values are considered to be false for this
192 purpose.
193
--- www/json-api/conventions.md
+++ www/json-api/conventions.md
@@ -181,12 +181,12 @@
181 but few, if any, use negative values).
182
183 **Boolean** parameters are a bit schizophrenic...
184
185 In **CLI mode**, boolean flags do not have a value, per se, and thus
186 require no string-to-bool conversion. e.g.
187 `fossil foo -aBoolOpt -non-bool-opt value`.
188
189 Those which arrive as strings via **GET parameters** treat any of the
190 following as true: a string starting with a character in the set
191 `[1-9tT]`. All other string values are considered to be false for this
192 purpose.
193
--- www/json-api/hacking.md
+++ www/json-api/hacking.md
@@ -38,11 +38,11 @@
3838
3939
<a id="json-c-api"></a>
4040
# JSON C API
4141
4242
libcson, the underlying JSON API, is a separate project, included in
43
-fossil in "amalgamation" form: see `src/cson_amalgamation.[ch]`. It has
43
+fossil in "amalgamation" form: see `extsrc/cson_amalgamation.[ch]`. It has
4444
thorough API docs and a good deal of information is in its wiki:
4545
4646
[](https://fossil.wanderinghorse.net/wikis/cson/)
4747
4848
In particular:
@@ -51,12 +51,12 @@
5151
5252
gives an overview of its architecture. Occasionally new versions of it
5353
are pulled into the Fossil tree, but other developers generally need not
5454
concern themselves with that.
5555
56
-(Trivia: the cson wiki's back-end is fossil, living on top of a
57
-JavaScript+HTML5 application.)
56
+(Trivia: the cson wiki's back-end is fossil using this very JSON API,
57
+living on top of a custom JavaScript+HTML5 application.)
5858
5959
Only a small handful of low-level fossil routines actually input or
6060
output JSON text (only for reading in POST data and sending the
6161
response). In the C code we work with the higher-level JSON value
6262
abstractions provided by cson (conceptually similar to an XML DOM). All
@@ -309,11 +309,11 @@
309309
The `cson_sqlite3_xxx()` family of functions convert `sqlite3_stmt` rows
310310
to Arrays or Objects, or convert single columns to a JSON-compatible
311311
form. See `json_stmt_to_array_of_obj()`,
312312
`json_stmt_to_array_of_array()` (both in `src/json.c`), and
313313
`cson_sqlite3_column_to_value()` and friends (in
314
-`src/cson_amalgamation.h`). They work in an intuitive way for numeric
314
+`extsrc/cson_amalgamation.h`). They work in an intuitive way for numeric
315315
types, but they optimistically/natively *assume* that any fields of type
316316
TEXT or BLOB are actually UTF8 data, and treat them as such. cson's
317317
string class only handles UTF8 data and it is semantically illegal to
318318
feed them anything but UTF8. Violating this will likely result in
319319
down-stream errors (e.g. when emiting the JSON string output). **The
320320
--- www/json-api/hacking.md
+++ www/json-api/hacking.md
@@ -38,11 +38,11 @@
38
39 <a id="json-c-api"></a>
40 # JSON C API
41
42 libcson, the underlying JSON API, is a separate project, included in
43 fossil in "amalgamation" form: see `src/cson_amalgamation.[ch]`. It has
44 thorough API docs and a good deal of information is in its wiki:
45
46 [](https://fossil.wanderinghorse.net/wikis/cson/)
47
48 In particular:
@@ -51,12 +51,12 @@
51
52 gives an overview of its architecture. Occasionally new versions of it
53 are pulled into the Fossil tree, but other developers generally need not
54 concern themselves with that.
55
56 (Trivia: the cson wiki's back-end is fossil, living on top of a
57 JavaScript+HTML5 application.)
58
59 Only a small handful of low-level fossil routines actually input or
60 output JSON text (only for reading in POST data and sending the
61 response). In the C code we work with the higher-level JSON value
62 abstractions provided by cson (conceptually similar to an XML DOM). All
@@ -309,11 +309,11 @@
309 The `cson_sqlite3_xxx()` family of functions convert `sqlite3_stmt` rows
310 to Arrays or Objects, or convert single columns to a JSON-compatible
311 form. See `json_stmt_to_array_of_obj()`,
312 `json_stmt_to_array_of_array()` (both in `src/json.c`), and
313 `cson_sqlite3_column_to_value()` and friends (in
314 `src/cson_amalgamation.h`). They work in an intuitive way for numeric
315 types, but they optimistically/natively *assume* that any fields of type
316 TEXT or BLOB are actually UTF8 data, and treat them as such. cson's
317 string class only handles UTF8 data and it is semantically illegal to
318 feed them anything but UTF8. Violating this will likely result in
319 down-stream errors (e.g. when emiting the JSON string output). **The
320
--- www/json-api/hacking.md
+++ www/json-api/hacking.md
@@ -38,11 +38,11 @@
38
39 <a id="json-c-api"></a>
40 # JSON C API
41
42 libcson, the underlying JSON API, is a separate project, included in
43 fossil in "amalgamation" form: see `extsrc/cson_amalgamation.[ch]`. It has
44 thorough API docs and a good deal of information is in its wiki:
45
46 [](https://fossil.wanderinghorse.net/wikis/cson/)
47
48 In particular:
@@ -51,12 +51,12 @@
51
52 gives an overview of its architecture. Occasionally new versions of it
53 are pulled into the Fossil tree, but other developers generally need not
54 concern themselves with that.
55
56 (Trivia: the cson wiki's back-end is fossil using this very JSON API,
57 living on top of a custom JavaScript+HTML5 application.)
58
59 Only a small handful of low-level fossil routines actually input or
60 output JSON text (only for reading in POST data and sending the
61 response). In the C code we work with the higher-level JSON value
62 abstractions provided by cson (conceptually similar to an XML DOM). All
@@ -309,11 +309,11 @@
309 The `cson_sqlite3_xxx()` family of functions convert `sqlite3_stmt` rows
310 to Arrays or Objects, or convert single columns to a JSON-compatible
311 form. See `json_stmt_to_array_of_obj()`,
312 `json_stmt_to_array_of_array()` (both in `src/json.c`), and
313 `cson_sqlite3_column_to_value()` and friends (in
314 `extsrc/cson_amalgamation.h`). They work in an intuitive way for numeric
315 types, but they optimistically/natively *assume* that any fields of type
316 TEXT or BLOB are actually UTF8 data, and treat them as such. cson's
317 string class only handles UTF8 data and it is semantically illegal to
318 feed them anything but UTF8. Violating this will likely result in
319 down-stream errors (e.g. when emiting the JSON string output). **The
320

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button