You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,9 +104,9 @@ For numbers larger than 64 bits, the method `get_value` will work, which will re
104
104
105
105
### Fine-grained maximum parameter control
106
106
107
-
If the predefined JSON types are not sufficient for your use case, you can define a JSON object with a custom parametrisation:
107
+
If the predefined JSON types are not sufficient for your use case, you can define a JSON object with a custom parameterization:
108
108
109
-
The JSON struct in `dep::json_parser::json::JSON` is parametrised with the following parameters:
109
+
The JSON struct in `dep::json_parser::json::JSON` is parameterized with the following parameters:
110
110
111
111
`struct JSON<let NumBytes: u32, let NumPackedFields: u32, let MaxNumTokens: u32, let MaxNumValues: u32, let MaxKeyFields: u32>`
112
112
@@ -116,11 +116,11 @@ The JSON struct in `dep::json_parser::json::JSON` is parametrised with the follo
116
116
-`MaxNumValues`: the maximum number of values in the json blob _plus one_
117
117
-`MaxKeyFields`: the largest size a key can take (in bytes) equals `MaxKeyFields * 31`
118
118
119
-
e.g. to take the existing 1kb JSON paramters, but also support 124-byte keys, use `JSON<1024, 37, 128, 65, 4>`
119
+
e.g. to take the existing 1kb JSON parameters, but also support 124-byte keys, use `JSON<1024, 37, 128, 65, 4>`
120
120
121
121
### Making queries with keys of unknown length
122
122
123
-
If you are deriving a key to look up in-circuit and you do not know the maximum length of the key, all query methods have a version with a `_var` suffix (e.g. `JSON::get_string_var`), which accepts the key as a `BoundedVec`
123
+
If you are deriving a key to look up in-circuit and you do not know the maximum length of the key, all query methods accept the key as a `BoundedVec`
0 commit comments