use encode_json instead of j in examples