Fixed jsonPostEncode method