Skip to content

Commit

Permalink
More clearly document that only needed fields should be listed
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijskooijman committed May 13, 2016
1 parent d5d7607 commit fa073c3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ fields in a generic way, for example to print the parse results with
just a few lines of code. See the parse and read examples for how this
works.

Note that these examples contain the full list of supported fields,
which causes parsing and printing code to be generated for all those
fields, even if they are not present in the output you want to parse. It
is recommended to limit the list of fields to just the ones that you
need, to make the parsing and printing code smaller and faster.

Parsed value types
------------------
Some values are parsed to an Arduino `String` value or C++ integer type,
Expand Down
4 changes: 3 additions & 1 deletion examples/parse/parse.ino
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ const char raw[] =

/**
* Define the data we're interested in, as well as the datastructure to
* hold the parsed data.
* hold the parsed data. This list shows all supported fields, remove
* any fields you are not using from the below list to make the parsing
* and printing code smaller.
* Each template argument below results in a field of the same name.
*/
using MyData = ParsedData<
Expand Down
4 changes: 3 additions & 1 deletion examples/read/read.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

/**
* Define the data we're interested in, as well as the datastructure to
* hold the parsed data.
* hold the parsed data. This list shows all supported fields, remove
* any fields you are not using from the below list to make the parsing
* and printing code smaller.
* Each template argument below results in a field of the same name.
*/
using MyData = ParsedData<
Expand Down

0 comments on commit fa073c3

Please sign in to comment.