Tweaking json and xml encodings and outputs.