I don't like this solution, what about building the same logic as jsonapi? But only with simplejson and json since jsonlib converts the bytes to numbers and atm I see no way to recover from that.