Closed vtan-fortinet closed 8 months ago
Thanks for the report, I'll take a look at this
Hi @vtan-fortinet,
Thanks again for the report. Seems you were hitting the default case here which was added a while ago to handle the following part of the spec:
If no type is indicated, the type is string.
This was indeed due to an issue in how "existence" of the value was implemented. I've now pushed the change for the code that will handle empty values for all the known data-types in accordance to the spec. This means that while there is a way for arrays to be empty, there is no way for the struct to be empty.
v0.5.1 should be available shortly.
Thank you for the prompt response! I've tested and I can confirm you fixed it.
On a response like
I expect somestring to be "" but I get the raw xml instead
Test case output:
Repro case in https://github.com/vtan-fortinet/go-xmlrpc/commit/f7513b3ad5acdb5ed41f1f16c410af04ed8f1704