Open KenBerg75 opened 9 years ago
@KenBerg75 - while you're right, as one of the early API consumers of Pillbox, I know this has been the situation from the beginning and people have been working around it until v2.
As you can see in https://github.com/kgautreaux/pillboxr which is linked to from https://github.com/HHS/pillbox_docs 's README, the code literally converts ampersands: https://github.com/kgautreaux/pillboxr/blob/master/lib/pillboxr/request.rb
You might want to take this approach for now. Hope this helps!
@KenBerg75 I'm the PM. I'll look into this as we should be escaping special characters. Also, JSON is coming soon. Thanks.
I'll second this as an issue. I use JAXB for XML parsing, and the unescaped ampersands in the RXSTRING values are crashing the XML parser. Interestingly enough, the SPL_INACTIVE_ING values have escaped ampersands, but the RXSTRING ones do not.
@Mauvila we're moving the Pillbox API to Socrata's open data API (http://www.socrata.com/products/open-data-api/) in the next few weeks. Among a long list of benefits I'm excited about, it should also resolve this issue. I'll be notifying all the Pillbox API devs once we have the migration plan in place.
In my XML queries, I have noticed invalid/special characters in some of the text. Perhaps filtering these special characters or supporting JSON would remove the issue? One such example (Note the '&' in the RXSTRING):
The '&' within the field makes this XML invalid.