8000 Added links to the book page in each example · joglosemarduino/ArduinoJson@afdd913 · GitHub
[go: up one dir, main page]

Skip to content

Commit afdd913

Browse files
committed
Added links to the book page in each example
1 parent 3df4efd commit afdd913

File tree

9 files changed

+114
-10
lines changed

9 files changed

+114
-10
lines changed

examples/JsonConfigFile/JsonConfigFile.ino

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
// "hostname": "examples.com",
1111
// "port": 2731
1212
// }
13+
//
14+
// https://arduinojson.org/v6/example/config/
1315

1416
#include <ArduinoJson.h>
1517
#include <SD.h>
@@ -130,4 +132,15 @@ void loop() {
130132
// not used in this example
131133
}
132134

133-
// Visit https://arduinojson.org/v6/example/config/ for more.
135+
// See also
136+
// --------
137+
//
138+
// https://arduinojson.org/ contains the documentation for all the functions
139+
// used above. It also includes an FAQ that will help you solve any
140+
// serialization or deserialization problem.
141+
//
142+
// The book "Mastering ArduinoJson" contains a case study of a project that has
143+
// a complex configuration with nested members.
144+
// Contrary to this example, the project in the book uses the SPIFFS filesystem.
145+
// Learn more at https://arduinojson.org/book/
146+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/JsonGeneratorExample/JsonGeneratorExample.ino

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// MIT License
44
//
55
// This example shows how to generate a JSON document with ArduinoJson.
6+
//
7+
// https://arduinojson.org/v6/example/generator/
68

79
#include <ArduinoJson.h>
810

@@ -61,4 +63,15 @@ void loop() {
6163
// not used in this example
6264
}
6365

64-
// Visit https://arduinojson.org/v6/example/generator/ for more.
66+
// See also
67+
// --------
68+
//
69+
// https://arduinojson.org/ contains the documentation for all the functions
70+
// used above. It also includes an FAQ that will help you solve any
71+
// serialization problem.
72+
//
73+
// The book "Mastering ArduinoJson" contains a tutorial on serialization.
74+
// It begins with a simple example, like the one above, and then adds more
75+
// features like serializing directly to a file or an HTTP request.
76+
// Learn more at https://arduinojson.org/book/
77+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/JsonHttpClient/JsonHttpClient.ino

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// 2.302038
1616
// ]
1717
// }
18+
//
19+
// https://arduinojson.org/v6/example/http-client/
1820

1921
#include <ArduinoJson.h>
2022
#include <Ethernet.h>
@@ -98,4 +100,16 @@ void loop() {
98100
// not used in this example
99101
}
100102

101-
// Visit https://arduinojson.org/v6/example/http-client/ for more.
103+
// See also
104+
// --------
105+
//
106+
// https://arduinojson.org/ contains the documentation for all the functions
107+
// used above. It also includes an FAQ that will help you solve any
108+
// serialization problem.
109+
//
110+
// The book "Mastering ArduinoJson" contains a tutorial on deserialization
111+
// showing how to parse the response from GitHub's API. In the last chapter,
112+
// it shows how to parse the huge documents from OpenWeatherMap
113+
// and Reddit.
114+
// Learn more at https://arduinojson.org/book/
115+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/JsonParserExample/JsonParserExample.ino

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// MIT License
44
//
55
// This example shows how to deserialize a JSON document with ArduinoJson.
6+
//
7+
// https://arduinojson.org/v6/example/parser/
68

79
#include <ArduinoJson.h>
810

@@ -64,4 +66,15 @@ void loop() {
6466
// not used in this example
6567
}
6668

67-
// Visit https://arduinojson.org/v6/example/parser/ for more.
69+
// See also
70+
// --------
71+
//
72+
// https://arduinojson.org/ contains the documentation for all the functions
73+
// used above. It also includes an FAQ that will help you solve any
74+
// deserialization problem.
75+
//
76+
// The book "Mastering ArduinoJson" contains a tutorial on deserialization.
77+
// It begins with a simple example, like the one above, and then adds more
78+
// features like deserializing directly from a file or an HTTP request.
79+
// Learn more at https://arduinojson.org/book/
80+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/JsonServer/JsonServer.ino

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// "analog": [0, 76, 123, 158, 192, 205],
1313
// "digital": [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0]
1414
// }
15+
//
16+
// https://arduinojson.org/v6/example/http-server/
1517

1618
#include <ArduinoJson.h>
1719
#include <Ethernet.h>
@@ -94,4 +96,15 @@ void loop() {
9496
client.stop();
9597
}
9698

97-
// Visit https://arduinojson.org/v6/example/http-server/ for more.
99+
// See also
100+
// --------
101+
//
102+
// https://arduinojson.org/ contains the documentation for all the functions
103+
// used above. It also includes an FAQ that will help you solve any
104+
// serialization problem.
105+
//
106+
// The book "Mastering ArduinoJson" contains a tutorial on serialization.
107+
// It begins with a simple example, then adds more features like serializing
108+
// directly to a file or an HTTP client.
109+
// Learn more at https://arduinojson.org/book/
110+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/JsonUdpBeacon/JsonUdpBeacon.ino

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// For example, you can run netcat on your computer
1717
// $ ncat -ulp 8888
1818
// See https://nmap.org/ncat/
19+
//
20+
// https://arduinojson.org/v6/example/udp-beacon/
1921

2022
#include <ArduinoJson.h>
2123
#include <Ethernet.h>
@@ -84,4 +86,15 @@ void loop() {
8486
delay(10000);
8587
}
8688

87-
// Visit https://arduinojson.org/v6/example/udp-beacon/ for more.
89+
// See also
90+
// --------
91+
//
92+
// https://arduinojson.org/ contains the documentation for all the functions
93+
// used above. It also includes an FAQ that will help you solve any
94+
// serialization problem.
95+
//
96+
// The book "Mastering ArduinoJson" contains a tutorial on serialization.
97+
// It begins with a simple example, then adds more features like serializing
98+
// directly to a file or any stream.
99+
// Learn more at https://arduinojson.org/book/
100+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/MsgPackParser/MsgPackParser.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//
55
// This example shows how to deserialize a MessagePack document with
66
// ArduinoJson.
7+
//
8+
// https://arduinojson.org/v6/example/msgpack-parser/
79

810
#include <ArduinoJson.h>
911

@@ -71,5 +73,3 @@ void setup() {
7173
void loop() {
7274
// not used in this example
7375
}
74-
75-
// Visit https://arduinojson.org/v6/example/msgpack-parser/ for more.

examples/ProgmemExample/ProgmemExample.ino

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// Use Flash strings sparingly, because ArduinoJson duplicates them in the
99
// JsonDocument. Prefer plain old char*, as they are more efficient in term of
1010
// code size, speed, and memory usage.
11+
//
12+
// https://arduinojson.org/v6/example/progmem/
1113

1214
#include <ArduinoJson.h>
1315

@@ -56,4 +58,15 @@ void loop() {
5658
// not used in this example
5759
}
5860

59-
// Visit https://arduinojson.org/v6/example/progmem/ for more.
61+
// See also
62+
// --------
63+
//
64+
// https://arduinojson.org/ contains the documentation for all the functions
65+
// used above. It also includes an FAQ that will help you solve any memory
66+
// problem.
67+
//
68+
// The book "Mastering ArduinoJson" contains a quick C++ course that explains
69+
// how your microcontroller stores strings in memory. It also tells why you
70+
// should not abuse Flash strings with ArduinoJson.
71+
// Learn more at https://arduinojson.org/book/
72+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

examples/StringExample/StringExample.ino

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// Use String objects sparingly, because ArduinoJson duplicates them in the
88
// JsonDocument. Prefer plain old char[], as they are more efficient in term of
99
// code size, speed, and memory usage.
10+
//
11+
// https://arduinojson.org/v6/example/string/
1012

1113
#include <ArduinoJson.h>
1214

@@ -62,4 +64,14 @@ void loop() {
6264
// not used in this example
6365
}
6466

65-
// Visit https://arduinojson.org/v6/example/string/ for more.
67+
// See also
68+
// --------
69+
//
70+
// https://arduinojson.org/ contains the documentation for all the functions
71+
// used above. It also includes an FAQ that will help you solve any problem.
72+
//
73+
// The book "Mastering ArduinoJson" contains a quick C++ course that explains
74+
// how your microcontroller stores strings in memory. On several occasions, it
75+
// shows how you can avoid String in your program.
76+
// Learn more at https://arduinojson.org/book/
77+
// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤

0 commit comments

Comments
 (0)
0