r/shittyprogramming • • Mar 28 '15

Real men hard-code their JSON

Post image
372 Upvotes

28 comments sorted by

View all comments

1

u/whoisearth Mar 28 '15

:( I have to do this with XML because I'm parsing data from a 3rd party application and without access to their code I have to mirror what they provide. Sometimes you gotta do it :(

4

u/tyteen4a03 Mar 28 '15

Can't you just throw it into SimpleXML?

4

u/whoisearth Mar 28 '15

custom xml that involves multiple nested elements from quite a few tables in a database. I probably could, if given the time, figure it properly using the django rest framework serializers but end of the day it was much easier for me to make a template and just pass the data into there. Ugly as sin, but it works :)