Closed jlaurila closed 6 years ago
Hi @jlaurila,
Thanks for reporting, I'll fix it as soon as possible.
Kind Regards, Florian
Hi @jlaurila,
Unfortunately your suggested regex broke the unit tests, as pre 9.0 regexes will not be matched properly anymore. I'll work on an expression that works for both versions.
Kind Regards, Florian
Yeah, I noticed the same. I made a hotfix with this regexp /^{[\s\S]*}/m which is naive but seems to work with unit tests and 9.0. Didn't try with 8.x. Thanks for looking into this.
Hey @jlaurila,
sorry for the late response, I was lacking a development org (and time). I looked into it right now and your last regex seems to do the trick. I just applied it and published it as v3.6.11, can you give it a try? Thanks in advance.
Kind Regards, Florian
https://github.com/DigitalFlow/Xrm-WebApi-Client/blob/040b255be0312efa1ba0a8e176eb1d94d77f5820/src/js/WebApiClient.Response.js#L15
this should be changed to less strict regexp about whitespace: ^{[\s\S]*?(?=})}
8.2 format: { "@odata.context":".....","value":[ ] }
9.0 format: {"@odata.context":".....","value":[]}
other similar changes are possible and should be checked.