added JSON parsing for TSX (UNTESTED)