Parse JSON to BSON and vice-versa.