Skip to content

Commit ee7e96c

Browse files
committed
Print the filter to diagnose missing values
1 parent 59b0dd8 commit ee7e96c

File tree

5 files changed

+49
-4
lines changed

5 files changed

+49
-4
lines changed

src/pages/v7/runtime/deserialization/noerror/novalue/filter/assistant.md renamed to src/pages/v7/runtime/deserialization/noerror/novalue/filter/correct.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ options:
44
label: "Yes"
55
summary: Fixing the filter solves the issue
66
page: /done.md
7-
filter-ok:
7+
assistant:
88
label: "No"
99
summary: Fixing the filter doesn't solve the issue
1010
page: ../print.md
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
options:
3+
success:
4+
label: "Yes"
5+
summary: Fixing the filter solves the issue
6+
page: /done.md
7+
assistant:
8+
label: "No"
9+
summary: Fixing the filter doesn't solve the issue
10+
page: ../print.md
11+
---
12+
13+
Let's fix the filter using the [ArduinoJson Assistant](/v7/assistant/).
14+
15+
Open the [ArduinoJson Assistant](/v7/assistant/):
16+
17+
* in step 1: choose "Deserialize and filter"
18+
* in step 2:
19+
* in the "input" column, paste a sample input
20+
* in the "filter" column, paste the filter that your program just printed
21+
22+
The column "filtered input" shows the result of applying the filter to the input.
23+
Make sure the result is what you expect, and adjust the filter as needed.
24+
Once happy with the result, you can move to step 4 and copy the block that fills the filter.
25+
26+
Did this solve your issue?

src/pages/v7/runtime/deserialization/noerror/novalue/filter/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ options:
77
overflowed-0:
88
label: "`0` (or `false`)"
99
summary: "`filter.overflowed()` returns `false`"
10-
page: assistant.md
10+
page: print.md
1111
---
1212

13-
Please print the value of `JsonDocument::overflowed()`, like so:
13+
Please print the value of `filter.overflowed()`, like so:
1414

1515
```c++
1616
Serial.println(filter.overflowed());

src/pages/v7/runtime/deserialization/noerror/novalue/filter/overflowed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ options:
77
failure:
88
label: "No"
99
summary: Freeing some memory doesn't solve the issue.
10-
page: assistant.md
10+
page: print.md
1111
---
1212

1313
`JsonDocument::overflowed()` returns `true` when you try to insert a value in the `JsonDocument`, but the memory allocation fails.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
options:
3+
correct:
4+
label: "Yes, the filter looks correct"
5+
summary: Printing the filter shows that it is correct
6+
page: correct.md
7+
incorrect:
8+
label: "No, the filter is incorrect"
9+
summary: Printing the filter shows that it is incorrect
10+
page: incorrect.md
11+
---
12+
13+
Please print the content of the filter, like so:
14+
15+
```c++
16+
serializeJsonPretty(doc, filter);
17+
```
18+
19+
Does this look correct?

0 commit comments

Comments
 (0)