Closed pocockn closed 1 year ago
Hey @pocockn ! Not sure to understand what you're trying to do.
If you want to use []map[string]interface{}
instead of strictly typed models you can use the low level methods from odoo.go (example: https://github.com/skilld-labs/go-odoo/blob/master/odoo.go#L212) and inject in the elem
parameter a []map[string]interface{}
, it should work.
Tell me if you have any question :-)
Antoine
When data enters via ingress we transform it into
[]map[string]interface
.If we return a JSON encoded byte slice from the Odoo API we can easily use our current tooling to transform those bytes into
[]map[string]interface{}
and validate, transform and render the document.Returning as a byte slice allows us to easily send the data over the wire.
This is an easier process than returning one of the generated structs, transforming it to a format we support and then transforming to a
[]map[string]interface