Files
flatbuffers/tests/monsterdata_test.json
Alex Ames d575321eba Added the hash attribute to ints and longs.
FlatBuffer schema files can now optionally specify a hash attribute that
will allow someone writing json files to enter a string to be hashed
rather than a specific value. The hashing algorithm to use is specified
by the schema.

Currently the only algorithms are fnv1 and fnv1a. There are 32 bit and
64 variatns for each. Additionally, a hashing command line tool was
added so that you can see what a string will hash to without needing to
inspect the flatbuffer binary blob.

Change-Id: I0cb359d0e2dc7d2dc1874b446dc19a17cc77109d
2015-02-17 14:10:18 -08:00

49 lines
825 B
JSON
Executable File

{
pos: {
x: 1,
y: 2,
z: 3,
test1: 3,
test2: Green,
test3: {
a: 5,
b: 6
}
},
hp: 80,
name: "MyMonster",
inventory: [
0,
1,
2,
3,
4
],
test_type: Monster,
test: {
name: "Fred"
},
test4: [
{
a: 10,
b: 20
},
{
a: 30,
b: 40
}
],
testarrayofstring: [
"test1",
"test2"
],
testhashs32_fnv1: "This string is being hashed!",
testhashu32_fnv1: "This string is being hashed!",
testhashs64_fnv1: "This string is being hashed!",
testhashu64_fnv1: "This string is being hashed!",
testhashs32_fnv1a: "This string is being hashed!",
testhashu32_fnv1a: "This string is being hashed!",
testhashs64_fnv1a: "This string is being hashed!",
testhashu64_fnv1a: "This string is being hashed!",
}