Hi all, Has anyone had any experience with odata? ...
# cfml-general
s
Hi all, Has anyone had any experience with odata? I have a javascript library that expects to hit an odata source. It generates a funky 'filter' JSON string to represent a SQL
where
clause, and I need to parse this to pull data out of my DB. I was hoping this was a fairly common usecase and there'd be a library out there that can at least parse the JSON into a reasonably usable SQL string, but the only thing I can find that even references odata is Abram Adams' dao/norm project, and that seems more concerned with consuming an odata source than presenting one.
In actual fact, it seems my main problem is that the Javascript library I'm using produces a filter string that is not handled properly by the dao/norm logic. I'm not sure if the library itself is producing a non standard filter string, or if the dao/norm logic doesn't cover all cases... but either way I'm a bit stuck. FYI the library is 'DevExtreme', which seems well used in .NET circles. If anyone has any experience working with this, I'd appreciate some insight into how to parse either their oData filter strings, or their native filter strings which are nested JSON arrays and work a bit differently. I'm going to have to attempt to build a parser manually at the moment I think.