Fix resource reference encoding for JSON parser - Thanks Tommy Nguyen for reporting!