Closed gioadami closed 7 years ago
Hi, and thanks! In general this is the convention with Proton... However this particular formatter was created for usage with Orion... I wasn't aware of Orion's treatment of such strings. So this fix makes complete sense, if you create a pull request I can merge it into stream.
Hi, it seems that there's a problem in the JSONNgsiFormatter formatInstance method. When generating the json, all the attrValues are enclosed by ", regardless of their actual types. The problem arise when Orion receive a PATCH request containing an attribute whose value is enclosed by quotes, as it overrides its original type and set it to String.
I made this change on my local version and it seems to fix the problem:
(I'm not sure it fixes json generation for all types as I didn't run a test for all of them)
Thank you.