java. Tested formats, rewrote json serialization, fixed #272, fixed #258.