added support getting a specific revision with get_doc()
do not json encode scalars to be safe