Struct with no members decoded to nil instead of empty struct
codidex opened this issue · 0 comments
codidex commented
Hello,
Using your library I found a different behavior than previous I used for empty structs.
I my use case i'm proxying http requests with json body to a xmlrpc server.
I receive this kind of data from my xmlrpc server:
<?xml version='1.0'?>
<methodResponse>
<params><param><value>
<struct></struct>
</value></param></params>
</methodResponse>
But it's decoded as 'nil' instead of an empty struct like map[string]interface{}.
Sadly, i'm experienced enough with go to fix this.
Is there a way to change this behavior ?
Regards.