Skip to content

Commit 437479e

Browse files
authored
fix json code sample (#955)
1 parent 2f17c9a commit 437479e

File tree

4 files changed

+88
-20
lines changed

4 files changed

+88
-20
lines changed

docs/tariffs.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,29 @@ Plugins können weiterhin Daten in stündlichen Intervallen liefern, diese werde
286286

287287
Siehe nachfolgendes Beispiel mit 15-Minuten-Intervallen:
288288

289-
```js
289+
```json
290290
[
291-
{ start: "2025-01-01T00:00:00Z", end: "2025-01-01T00:15:00Z", value: 25.0 },
292-
{ start: "2025-01-01T00:15:00Z", end: "2025-01-01T00:30:00Z", value: 26.5 },
293-
{ start: "2025-01-01T00:30:00Z", end: "2025-01-01T00:45:00Z", value: 24.8 },
294-
{ start: "2025-01-01T00:45:00Z", end: "2025-01-01T01:00:00Z", value: 27.2 },
295-
];
291+
{
292+
"start": "2025-01-01T00:00:00Z",
293+
"end": "2025-01-01T00:15:00Z",
294+
"value": 25.0
295+
},
296+
{
297+
"start": "2025-01-01T00:15:00Z",
298+
"end": "2025-01-01T00:30:00Z",
299+
"value": 26.5
300+
},
301+
{
302+
"start": "2025-01-01T00:30:00Z",
303+
"end": "2025-01-01T00:45:00Z",
304+
"value": 24.8
305+
},
306+
{
307+
"start": "2025-01-01T00:45:00Z",
308+
"end": "2025-01-01T01:00:00Z",
309+
"value": 27.2
310+
}
311+
]
296312
```
297313

298314
Das Plugin wird einmal pro Stunde aktualisiert.

docs/tariffs/_dynamischer_strompreis.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,29 @@ Plugins können weiterhin Daten in stündlichen Intervallen liefern, diese werde
3636

3737
Siehe nachfolgendes Beispiel mit 15-Minuten-Intervallen:
3838

39-
```js
39+
```json
4040
[
41-
{ start: "2025-01-01T00:00:00Z", end: "2025-01-01T00:15:00Z", value: 25.0 },
42-
{ start: "2025-01-01T00:15:00Z", end: "2025-01-01T00:30:00Z", value: 26.5 },
43-
{ start: "2025-01-01T00:30:00Z", end: "2025-01-01T00:45:00Z", value: 24.8 },
44-
{ start: "2025-01-01T00:45:00Z", end: "2025-01-01T01:00:00Z", value: 27.2 },
45-
];
41+
{
42+
"start": "2025-01-01T00:00:00Z",
43+
"end": "2025-01-01T00:15:00Z",
44+
"value": 25.0
45+
},
46+
{
47+
"start": "2025-01-01T00:15:00Z",
48+
"end": "2025-01-01T00:30:00Z",
49+
"value": 26.5
50+
},
51+
{
52+
"start": "2025-01-01T00:30:00Z",
53+
"end": "2025-01-01T00:45:00Z",
54+
"value": 24.8
55+
},
56+
{
57+
"start": "2025-01-01T00:45:00Z",
58+
"end": "2025-01-01T01:00:00Z",
59+
"value": 27.2
60+
}
61+
]
4662
```
4763

4864
Das Plugin wird einmal pro Stunde aktualisiert.

i18n/en/docusaurus-plugin-content-docs/current/tariffs.mdx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,29 @@ The plugin must return a JSON structure containing a list of time periods and pr
282282
The date fields must be in the form `YYYY-MM-DDTHH:MM:SSZ` and the price in the correct currency unit (e.g. EUR).
283283
See the following example:
284284

285-
```js
285+
```json
286286
[
287-
{ start: "2025-01-01T00:00:00Z", end: "2025-01-01T01:00:00Z", value: 25.0 },
288-
{ start: "2025-01-01T01:00:00Z", end: "2025-01-01T02:00:00Z", value: 30.0 },
289-
];
287+
{
288+
"start": "2025-01-01T00:00:00Z",
289+
"end": "2025-01-01T00:15:00Z",
290+
"value": 25.0
291+
},
292+
{
293+
"start": "2025-01-01T00:15:00Z",
294+
"end": "2025-01-01T00:30:00Z",
295+
"value": 26.5
296+
},
297+
{
298+
"start": "2025-01-01T00:30:00Z",
299+
"end": "2025-01-01T00:45:00Z",
300+
"value": 24.8
301+
},
302+
{
303+
"start": "2025-01-01T00:45:00Z",
304+
"end": "2025-01-01T01:00:00Z",
305+
"value": 27.2
306+
}
307+
]
290308
```
291309

292310
The plugin is updated once per hour.

i18n/en/docusaurus-plugin-content-docs/current/tariffs/_dynamic_electricity_price.mdx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,29 @@ The plugin must return a JSON structure containing a list of time periods and pr
3131
The date fields must be in the form `YYYY-MM-DDTHH:MM:SSZ` and the price in the correct currency unit (e.g. EUR).
3232
See the following example:
3333

34-
```js
34+
```json
3535
[
36-
{ start: "2025-01-01T00:00:00Z", end: "2025-01-01T01:00:00Z", value: 25.0 },
37-
{ start: "2025-01-01T01:00:00Z", end: "2025-01-01T02:00:00Z", value: 30.0 },
38-
];
36+
{
37+
"start": "2025-01-01T00:00:00Z",
38+
"end": "2025-01-01T00:15:00Z",
39+
"value": 25.0
40+
},
41+
{
42+
"start": "2025-01-01T00:15:00Z",
43+
"end": "2025-01-01T00:30:00Z",
44+
"value": 26.5
45+
},
46+
{
47+
"start": "2025-01-01T00:30:00Z",
48+
"end": "2025-01-01T00:45:00Z",
49+
"value": 24.8
50+
},
51+
{
52+
"start": "2025-01-01T00:45:00Z",
53+
"end": "2025-01-01T01:00:00Z",
54+
"value": 27.2
55+
}
56+
]
3957
```
4058

4159
The plugin is updated once per hour.

0 commit comments

Comments
 (0)