fixed json memory leak

*looks pointedly at lex*