General documentation fixes; added ability to specify json encoding.