Skip to content

Commit 991471a

Browse files
committed
Fix JSON-formatting for type descriptions
1 parent 493a32b commit 991471a

File tree

1 file changed

+127
-127
lines changed

1 file changed

+127
-127
lines changed

Types/index.rst

Lines changed: 127 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ JSON Representation of an attribute with a ``H5T_STD_I8LE`` (signed, one byte) t
4646
.. code-block:: json
4747
4848
{
49-
"name": "attr1",
50-
"shape": {
51-
"class": "H5S_SIMPLE",
52-
"dims": [27]
53-
},
54-
"type": {
55-
"class": "H5T_INTEGER",
56-
"base": "H5T_STD_I8LE"
49+
"name": "attr1",
50+
"shape": {
51+
"class": "H5S_SIMPLE",
52+
"dims": [27]
53+
},
54+
"type": {
55+
"class": "H5T_INTEGER",
56+
"base": "H5T_STD_I8LE"
5757
},
58-
"value": [49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, 32,
59-
111, 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0]
58+
"value": [49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, 32,
59+
111, 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0]
6060
}
6161
6262
@@ -85,17 +85,17 @@ JSON representation of a dataset using a fixed width string of 40 characters:
8585
.. code-block:: json
8686
8787
{
88-
"id": "1e8a359c-ac46-11e4-9f3e-3c15c2da029e",
89-
"shape": {
90-
"class": "H5S_SCALAR",
91-
},
92-
"type": {
93-
"class": "H5T_STRING",
94-
"charSet": "H5T_CSET_ASCII",
95-
"strPad": "H5T_STR_NULLPAD",
96-
"length": 40
88+
"id": "1e8a359c-ac46-11e4-9f3e-3c15c2da029e",
89+
"shape": {
90+
"class": "H5S_SCALAR",
91+
},
92+
"type": {
93+
"class": "H5T_STRING",
94+
"charSet": "H5T_CSET_ASCII",
95+
"strPad": "H5T_STR_NULLPAD",
96+
"length": 40
9797
},
98-
"value": "Hello, World!"
98+
"value": "Hello, World!"
9999
}
100100
101101
String Types - Variable Length
@@ -126,23 +126,23 @@ JSON representation of a attribute using a variable length string:
126126
.. code-block:: json
127127
128128
{
129-
"name": "A1",
130-
"shape": {
131-
"class": "H5S_SIMPLE",
132-
"dims": [4]
133-
},
134-
"type": {
135-
"class": "H5T_STRING",
136-
"charSet": "H5T_CSET_ASCII",
137-
"strPad": "H5T_STR_NULLTERM",
138-
"length": "H5T_VARIABLE"
139-
},
140-
"value": [
141-
"Hypermedia",
142-
"as the",
143-
"engine",
144-
"of state."
145-
]
129+
"name": "A1",
130+
"shape": {
131+
"class": "H5S_SIMPLE",
132+
"dims": [4]
133+
},
134+
"type": {
135+
"class": "H5T_STRING",
136+
"charSet": "H5T_CSET_ASCII",
137+
"strPad": "H5T_STR_NULLTERM",
138+
"length": "H5T_VARIABLE"
139+
},
140+
"value": [
141+
"Hypermedia",
142+
"as the",
143+
"engine",
144+
"of state."
145+
]
146146
}
147147
148148
@@ -169,30 +169,30 @@ floating point elements:
169169
.. code-block:: json
170170
171171
{
172-
"name": "mycomplex",
173-
"shape": {
174-
"class": "H5S_SCALAR"
175-
},
176-
"type": {
177-
"class": "H5T_COMPOUND",
178-
"fields": [
172+
"name": "mycomplex",
173+
"shape": {
174+
"class": "H5S_SCALAR"
175+
},
176+
"type": {
177+
"class": "H5T_COMPOUND",
178+
"fields": [
179179
{
180-
"name": "real_part",
181-
"type": {
180+
"name": "real_part",
181+
"type": {
182182
"base": "H5T_IEEE_F64LE",
183183
"class": "H5T_FLOAT"
184184
}
185185
},
186186
{
187-
"name": "imaginary_part",
188-
"type": {
187+
"name": "imaginary_part",
188+
"type": {
189189
"base": "H5T_IEEE_F64LE",
190190
"class": "H5T_FLOAT"
191191
}
192192
}
193193
]
194-
},
195-
"value": [ 1.2345, -2.468 ]
194+
},
195+
"value": [ 1.2345, -2.468 ]
196196
}
197197
198198
Enumerated Types
@@ -213,25 +213,25 @@ Example
213213
.. code-block:: json
214214
215215
{
216-
"id": "1e8a359c-ac46-11e4-9f3e-3c15c2da029e",
217-
"shape": {
218-
"class": "H5S_SIMPLE",
219-
"dims": [ 7 ]
220-
},
221-
"type": {
222-
"class": "H5T_ENUM",
223-
"base": {
224-
"class": "H5T_INTEGER",
225-
"base": "H5T_STD_I16BE"
226-
},
227-
"mapping": {
228-
"GAS": 2,
229-
"LIQUID": 1,
230-
"PLASMA": 3,
231-
"SOLID": 0
232-
}
233-
},
234-
"value": [ 0, 2, 3, 2, 0, 1, 1 ]
216+
"id": "1e8a359c-ac46-11e4-9f3e-3c15c2da029e",
217+
"shape": {
218+
"class": "H5S_SIMPLE",
219+
"dims": [ 7 ]
220+
},
221+
"type": {
222+
"class": "H5T_ENUM",
223+
"base": {
224+
"class": "H5T_INTEGER",
225+
"base": "H5T_STD_I16BE"
226+
},
227+
"mapping": {
228+
"GAS": 2,
229+
"LIQUID": 1,
230+
"PLASMA": 3,
231+
"SOLID": 0
232+
}
233+
},
234+
"value": [ 0, 2, 3, 2, 0, 1, 1 ]
235235
}
236236
237237
Array Types
@@ -252,24 +252,24 @@ A dataset with 3 elements, each of which is a 2x2 array of integers.
252252
.. code-block:: json
253253
254254
{
255-
"id": "9348ad51-7bf7-11e4-a66f-3c15c2da029e",
256-
"shape": {
257-
"class": "H5S_SIMPLE",
258-
"dims": [ 3 ]
259-
},
260-
"type": {
261-
"class": "H5T_ARRAY",
262-
"base": {
263-
"class": "H5T_INTEGER",
264-
"base": "H5T_STD_I16BE"
255+
"id": "9348ad51-7bf7-11e4-a66f-3c15c2da029e",
256+
"shape": {
257+
"class": "H5S_SIMPLE",
258+
"dims": [ 3 ]
259+
},
260+
"type": {
261+
"class": "H5T_ARRAY",
262+
"base": {
263+
"class": "H5T_INTEGER",
264+
"base": "H5T_STD_I16BE"
265+
},
266+
"dims": [ 2, 2 ]
265267
},
266-
"dims": [ 2, 2 ]
267-
},
268-
"value": [
269-
[ [1, 2], [3, 4] ],
270-
[ [2, 1], [4, 3] ],
271-
[ [1, 1], [4, 4] ]
272-
]
268+
"value": [
269+
[ [1, 2], [3, 4] ],
270+
[ [2, 1], [4, 3] ],
271+
[ [1, 1], [4, 4] ]
272+
]
273273
}
274274
275275
Opaque Types
@@ -304,20 +304,20 @@ third element points to a group.
304304
.. code-block:: json
305305
306306
{
307-
"name": "objref_attr",
308-
"shape": {
309-
"class": "H5S_SIMPLE",
310-
"dims": [ 3 ]
311-
},
312-
"type": {
313-
"class": "H5T_REFERENCE",
314-
"base": "H5T_STD_REF_OBJ"
315-
},
316-
"value": [
317-
"groups/a09a9b99-7bf7-11e4-aa4b-3c15c2da029e",
318-
"",
319-
"datasets/a09a8efa-7bf7-11e4-9fb6-3c15c2da029e"
320-
]
307+
"name": "objref_attr",
308+
"shape": {
309+
"class": "H5S_SIMPLE",
310+
"dims": [ 3 ]
311+
},
312+
"type": {
313+
"class": "H5T_REFERENCE",
314+
"base": "H5T_STD_REF_OBJ"
315+
},
316+
"value": [
317+
"groups/a09a9b99-7bf7-11e4-aa4b-3c15c2da029e",
318+
"",
319+
"datasets/a09a8efa-7bf7-11e4-9fb6-3c15c2da029e"
320+
]
321321
}
322322
323323
Region Reference Types
@@ -347,34 +347,34 @@ gives the boundary of the selection.
347347
.. code-block:: json
348348
349349
{
350-
"id": "68ee8647-7bed-11e4-9397-3c15c2da029e",
351-
"shape": {
352-
"class": "H5S_SIMPLE",
353-
"dims": [2]
354-
},
355-
"type": {
356-
"class": "H5T_REFERENCE",
357-
"base": "H5T_STD_REF_DSETREG"
358-
},
359-
"value": [
360-
{
361-
"id": "68ee967a-7bed-11e4-819c-3c15c2da029e",
362-
"select_type": "H5S_SEL_POINTS",
363-
"selection": [
364-
[0, 1], [2, 11], [1, 0], [2, 4]
365-
]
350+
"id": "68ee8647-7bed-11e4-9397-3c15c2da029e",
351+
"shape": {
352+
"class": "H5S_SIMPLE",
353+
"dims": [2]
354+
},
355+
"type": {
356+
"class": "H5T_REFERENCE",
357+
"base": "H5T_STD_REF_DSETREG"
366358
},
367-
{
368-
"id": "68ee967a-7bed-11e4-819c-3c15c2da029e",
369-
"select_type": "H5S_SEL_HYPERSLABS",
370-
"selection": [
371-
[ [0, 0], [0, 2] ],
372-
[ [0, 11], [0, 13] ],
373-
[ [2, 0], [2, 2] ],
374-
[ [2, 11], [2, 13] ]
375-
]
376-
}
377-
]
359+
"value": [
360+
{
361+
"id": "68ee967a-7bed-11e4-819c-3c15c2da029e",
362+
"select_type": "H5S_SEL_POINTS",
363+
"selection": [
364+
[0, 1], [2, 11], [1, 0], [2, 4]
365+
]
366+
},
367+
{
368+
"id": "68ee967a-7bed-11e4-819c-3c15c2da029e",
369+
"select_type": "H5S_SEL_HYPERSLABS",
370+
"selection": [
371+
[ [0, 0], [0, 2] ],
372+
[ [0, 11], [0, 13] ],
373+
[ [2, 0], [2, 2] ],
374+
[ [2, 11], [2, 13] ]
375+
]
376+
}
377+
]
378378
}
379379
380380
Type Keys

0 commit comments

Comments
 (0)