quicktype
quicktype copied to clipboard
json scheme to Cpp, enum has no origin order
We want enum with json order input as, but after we give input source:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Test",
"type": "object",
"properties": {
"errorCode": {
"type": "string",
"enum": [
"B",
"A",
"E"
]
}
}
}
but I always get like this:
enum class ErrorCode : int { A, B, E };
class Test {
public:
Test() = default;
virtual ~Test() = default;
we use this command:
quicktype -l c++ --code-format with-getter-setter --wstring use-string --const-style west-const --type-style pascal-case --member-style camel-case --enumerator-style pascal-case --no-boost -s schema test.json
Hi, I met the same problem. Did you find any solution? :(
This issue still exists, any updates?