ERP-Ukraine / odoo-rpc-dart

Odoo RPC Library for Dart
MIT License
43 stars 32 forks source link

CallKW result is not a valid json result #15

Closed dznour closed 3 years ago

dznour commented 3 years ago

Hi, I have an issue after calling a 'callKw' method the result as String is not a JSONformat instead it appears like that:

'[{id: 1, partner_id: [26, SIGMA soft], create_date: 2019-11-16 14:44:21, name: WH/IN/00001}, {id: 2, partner_id: [26, SIGMA soft], create_date: 2019-11-16 15:20:24, name: WH/IN/00002}, {id: 4, partner_id: [26, SIGMA soft], create_date: 2020-03-08 07:47:28, name: WH/IN/00003}, {id: 5, partner_id: [26, SIGMA soft], create_date: 2020-03-08 09:22:47, name: WH/IN/00004}, {id: 19, partner_id: [26, SIGMA soft], create_date: 2020-06-12 22:11:40, name: WH/IN/00005}]'

Any suggestions to set it as a valid JSON format. Thank you

lem8r commented 3 years ago

Hi!

How do you know it is a String? If you print it to a terminal it will always cast to String for representation. It should be list of Map in your case.

dznour commented 3 years ago

Hi!

How do you know it is a String? If you print it to a terminal it will always cast to String for representation. It should be list of Map in your case.

I tried creating a list object from it it gives an error that list is not subtype of String