did you consider using ujson? it has some performance improvements