Lines Matching full:json

1 ====== JSON Data Plugin ======
4 description: Build JSON database inside DokuWiki page and use the data in the page
13 tags : data, json, database, template, xmlrpc, listing, tables
15 downloadurl: https://gitlab.com/dokuwiki-json/json/-/archive/master/json-master.zip
16 bugtracker : https://gitlab.com/dokuwiki-json/json/-/issues
17 sourcerepo : https://gitlab.com/dokuwiki-json/json
20 screenshot_img: https://gitlab.com/dokuwiki-json/json/-/raw/master/demo/screenshot.png
28 * [[plugin:jsoneditor|JSON editor plugin]]
29 * [[plugin:jsontable|JSON table plugin]]
30 * [[plugin:jsongendoc|JSON generate document plugin]]
35 With JSON Data Plugin you can build [[https://www.json.org/|JSON]] database inside DokuWiki page. J…
37 To add JSON database into the wiki page write:
39 <json path=person>{
42 }</json>
45 With multiple ''<json>'' elements inside the page database is generated internally. There may also …
54 JSON data can be used in the following ways:
55 * Extract specific JSON **basic** element.
56 * Extract specific JSON object element as a **list**.
57 * Extract specific JSON array element as a **table**.
58 * Print specific part of data as JSON code.
59 * Show or hide sections of DokuWiki page, based on value of specific JSON element.
61 * JSON data can also be edited and safely stored back into the dokuwiki page via ajax call.
66json-demo.1001beauty.si/|DokuWiki JSON Demo Server]] with JSON database integrated into DokuWiki. …
71 For issues or just questions use [[https://gitlab.com/dokuwiki-json/json/-/issues|Issues]] on Gitla…
74 ===== JSON Data Definition Syntax =====
76JSON data. Data are inline or are loaded from external (text) files on each page refresh. Only tho…
78 ''<json ''//attributes//''>''//inline_json//''</json>''
80json>'' element is rendered, variable is something like this: ''%%json_database = {"person": {"fir…
83 ==== Inline JSON ====
85 Valid [[https://www.json.org/|JSON]] data can be located between %%<json ...>%% and %%</json>%% tag…
90 … be specified, when we want to access this json element from somewhere else or if we want to write…
113 src=https://www.example.com/file.json
116 src='{"JSON": "data", "can clone": %$pre-defined.data%}'
119 External data may be a pure JSON file, it begins with ''['' or ''{''.
121json>%% elements inside - remote DokuWiki page. Remote DokuWiki page then first loads data accordi…
123json>%% element from remote dokuwiki page. In that case %%<json>%% element must have an 'id' attri…
127JSON data. This way some already defined data from page can be "cloned" and reused. Similar as in …
134 <json src_ext=json_my_data></json>
142 …nts separated by ''&'' in Query string. If we want to specify specific %%<json>%% element, then we…
159 This attribute controls, which part of %%<json>%% element is rendered on html page. Multiple data c…
161 * 'inline' - display inline_data from %%<json>inline_data</json>%% element in textarea.
174 … tabs menu will be hidden. For example 'display=combined*' will only show JSON data without the ta…
176 …n tab area. There are some rules, which may prevent the saving. First, %%<json>%% element must hav…
181 … to make archive of the JSON database loaded by 'src' or 'src_ext' attribute. Archive is stored in…
183 …as 'archive' attribute equal to 'make' or 'disable', then button 'Archive JSON database' appears o…
189 …lements contains JSON database. Data is then read from 'archive' attribute. 'src' and 'scr_ext' at…
192 ===== JSON Data Usage Syntax =====
194JSON data in dokuwiki is: ''%%%$ ... %%%''. JSON data can be displayed in multiple different ways,…
225 * ''code'' - render variable as json code.
246 | **Print JSON data** | ''%%%$path.to.var #code#%%%'' | Print JSON raw data. |
259 ===== Data snippets inside inline JSON =====
262 <json path=renault>{
264 }</json>
266 Inside inline json we can use ''%%%$ path [( row_filter )]( filter )%%%'' syntax, which will be rep…
270 …d. For example, ''%%"%$path.name%, %$path.age% years"%%'' can be used for json string concatenated…
277 <json path=items_db>{
280 }</json>
283 <json path=items_purchased>[
287 ]</json>
292 <json path=items_purchased_extended>
294 </json>
311 JSON define ''%%<json ...> ... </json>%%'' or extract ''%%%$ ... %%%'' patterns can be quite verbos…
313 … macros in it. Use ''%%#@macro_name@#%%'' patterns inside json define or extract patterns. JSON de…
318 ===== Use JavaScript widgets with JSON data =====
320 JSON plugin has interface for other sub-plugins, which can use JSON data inside JavaScript widgets …
323 ===== Remote access to JSON data =====
330 === plugin.json.get ===
332 ^ Name | **plugin.json.get** |
333 ^ Description | Generate JSON database on page and return data from the JSON_path. |
335 ^ Parameter (string) JSON_path | Path on the JSON database, see [[#attribute_path]]. Optional param…
336 ^ Parameter (boolean) addLog | If true, additional information about JSON generation will be return…
340 === plugin.json.set ===
342 ^ Name | **plugin.json.set** |
343 ^ Description | Find ''<json id=...'' element inside page and set its inline data. |
345 ^ Parameter (string) json_id | Id of the json element, see [[#attribute_id]]. |
346 …array%%|%%string) data | Data to be put inside json element. Must be an array, empty string or val…
351 === plugin.json.append ===
353 ^ Name | **plugin.json.append** |
354 ^ Description | Find ''<json id=...'' element inside page and append data to its inline database. I…
356 …son_id | Id of the json element, see [[#attribute_id]]. If empty, complete page will be treated as…
357 ^ Parameter (array%%|%%string) data | JSON Data to be appended inside json element. Must be an arra…
367 wiki.send("plugin.json.get", "path:to:page")
370 wiki.send("plugin.json.set", "path:to:page", "id_attr", person)