有人知道是否存在用于C源代码的XSD代码生成器?我有很多xsd文件,我需要生成C struct和相关函数fromXml和toXml.谢谢.
I don't understand why an optional field (like middle_name in the example bellow), is not nullable in the kotlin generated representation while in golang and rust is properly nullable (or optional).
syntax = "proto3";
message User{
string id = 1;
string name = 2;
optional string middle_name = 3;
string last_name = 4;
}
Run Code Online (Sandbox Code Playgroud)
Kotlin generated code
...
public fun hasMiddleName(): kotlin.Boolean{...}
public var middleName: kotlin.String{...}
...
Run Code Online (Sandbox Code Playgroud)
Rust generated code
...
pub middle_name: ::std::option::Option<::std::string::String>,
...
Run Code Online (Sandbox Code Playgroud)
Golang generated code
...
MiddleName …Run Code Online (Sandbox Code Playgroud)