You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I am trying to parse it into this type structure
typeResponseDatastruct {
Resultstring`xmlrpc:"result"`// this will throw an error "error: type mismatch - can't unmarshal invalid to struct"// solution: use []UserData []*User`xmlrpc:"users"`
}
typeUserstruct {
IDint64`xmlrpc:"id"`Namestring`xmlrpc:"name"`// this will not throw error,// but it will define it even it's nilVendor*Vendor`xmlrpc:"vendor"`// vendor might be nilAccountIDint64`xmlrpc:"account_id"`// this will not work it will always be empty string even the value is nilNumber*string`xmlrpc:"number"`// phone number might be nil
}
typeVendorstruct {
VendorNamestring`xmlrpc:"vendor_name"`
}
in some cases, it will throw an error, and in some cases it will ignore the XML-RPC nil value and define the pointer as an empty value,
for example, if the XML-RPC has a nullable string and the type has a pointer type of a string the parser shouldn't define the string in a nil case it should leave it nil
The text was updated successfully, but these errors were encountered:
This project is a major help in for me and it freed up a lot of hours of my time.
This is not a bug it is an Enhancement request
but I think that this library is not parsing the nil values from XML-RPC to GO the right way
GO-PLAYGROUND
for example i have this XML-RPC
and I am trying to parse it into this type structure
in some cases, it will throw an error, and in some cases it will ignore the XML-RPC nil value and define the pointer as an empty value,
for example, if the XML-RPC has a nullable string and the type has a pointer type of a string the parser shouldn't define the string in a nil case it should leave it nil
The text was updated successfully, but these errors were encountered: