aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-06-02 16:41:22 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2017-06-12 14:34:45 -0700
commitdddd0865cb161a081afbdfa11919622a49f4141a (patch)
treec7c0e4636e958cf3bbc81ae4bc1dd4a94a5e29e8 /docs
parent0a81eb646346b663d3d6b97d9219191ad92979d3 (diff)
downloadflatbuffers-dddd0865cb161a081afbdfa11919622a49f4141a.tar.gz
Added nested FlexBuffer parsing
Change-Id: I918b66eb5646d035e3aae675f745802eb54b03ea
Diffstat (limited to 'docs')
-rw-r--r--docs/source/FlexBuffers.md10
-rwxr-xr-xdocs/source/Schemas.md3
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/source/FlexBuffers.md b/docs/source/FlexBuffers.md
index 5d592fea..afe3c93a 100644
--- a/docs/source/FlexBuffers.md
+++ b/docs/source/FlexBuffers.md
@@ -128,6 +128,16 @@ A description of how FlexBuffers are encoded is in the
[internals](Internals.md#flexbuffers) document.
+# Nesting inside a FlatBuffer
+
+You can mark a field as containing a FlexBuffer, e.g.
+
+ a:[ubyte] (flexbuffer);
+
+A special accessor will be generated that allows you to access the root value
+directly, e.g. `a_flexbuffer_root().AsInt64()`.
+
+
# Efficiency tips
* Vectors generally are a lot more efficient than maps, so prefer them over maps
diff --git a/docs/source/Schemas.md b/docs/source/Schemas.md
index c4a94216..1a322807 100755
--- a/docs/source/Schemas.md
+++ b/docs/source/Schemas.md
@@ -302,6 +302,9 @@ Current understood attributes:
(which must be a vector of ubyte) contains flatbuffer data, for which the
root type is given by `table_name`. The generated code will then produce
a convenient accessor for the nested FlatBuffer.
+- `flexbuffer` (on a field): this indicates that the field
+ (which must be a vector of ubyte) contains flexbuffer data. The generated
+ code will then produce a convenient accessor for the FlexBuffer root.
- `key` (on a field): this field is meant to be used as a key when sorting
a vector of the type of table it sits in. Can be used for in-place
binary search.