diff options
author | tira-misu <gunter.burchardt@boschrexroth.de> | 2021-02-10 20:45:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 11:45:34 -0800 |
commit | 0f83367f57861a55907691b51db4b2d4177c6296 (patch) | |
tree | f90e099a0c7f327caa68c26316799286493fdcfd /src | |
parent | fee095410b0969765b5c2545c10e585f69e961b0 (diff) | |
download | flatbuffers-0f83367f57861a55907691b51db4b2d4177c6296.tar.gz flatbuffers-0f83367f57861a55907691b51db4b2d4177c6296.tar.bz2 flatbuffers-0f83367f57861a55907691b51db4b2d4177c6296.zip |
JSON schema - tailing double quotes for maximum (#6452)
* Fix C/C++ Create<Type>Direct with sorted vectors
If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".
* Changes due to code review
* Improve code readability
* Add generate of JSON schema to string to lib
* option indent_step is supported
* Remove unused variables
* Fix break in test
* Fix style to be consistent with rest of the code
* Fix double quotes for (u)int8 in json schema
* Fix reference file for JSON schema test
* Fix reference file for JSON schema test
Diffstat (limited to 'src')
-rw-r--r-- | src/idl_gen_json_schema.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idl_gen_json_schema.cpp b/src/idl_gen_json_schema.cpp index 55192c92..d58bb849 100644 --- a/src/idl_gen_json_schema.cpp +++ b/src/idl_gen_json_schema.cpp @@ -49,10 +49,10 @@ std::string GenType(BaseType type) { return "\"type\" : \"integer\", \"minimum\" : " + NumToString(std::numeric_limits<int8_t>::min()) + ", \"maximum\" : " + - NumToString(std::numeric_limits<int8_t>::max()) + "\""; + NumToString(std::numeric_limits<int8_t>::max()); case BASE_TYPE_UCHAR: return "\"type\" : \"integer\", \"minimum\" : 0, \"maximum\" :" + - NumToString(std::numeric_limits<uint8_t>::max()) + "\""; + NumToString(std::numeric_limits<uint8_t>::max()); case BASE_TYPE_SHORT: return "\"type\" : \"integer\", \"minimum\" : " + NumToString(std::numeric_limits<int16_t>::min()) + |