Hey all,
I've noticed that flatc does some automatic style conversion when generating the serializer/deserializer class.
For example let's say I have a JSON file and a fbs schema for that JSON.
The field names in the JSON are all written in snake_case, like so:
{
"id": "some id",
"name_of_this_thing": "name",
"a_numerical_field": 3
}
The .fbs schema file is written to accommodate that, like so:
namespace "Data";
table SomeDataTable {
id:string;
name_of_this_thing:string;
a_numerical_field:int;
}
However, when I run flatc on the schema file to generate the C# classes with the --gen-object-api option, it will apply a style conversion on all the field names and the auto-generated code will be in UpperCamelCase, like so:
public string Id { get; set; }
public string NameOfThisThing { get; set; }
public int ANumericalField { get; set; }
I realize this is a weird ask, but is it possible to NOT have that automatic style conversion happen? Basically I'm writing a GUI tool for designers to use for data editing/creation (as opposed to having designers try to hand-edit json). To support that tool, I've been adding C# attributes to certain data classes to surface those flatbuffer fields as editable fields in the tool, but since the JSON is currently expected to be in snake_case instead of UpperCamelCase, there is a breakage there.
That may be kind of a bad explanation of my use case but basically I'm wondering if there's an undocumented optional flag or something I can use to tell flatc not to apply the style conversion.
Thanks in advance,
Kevin