Fix JSON compliance and add Python client library