fixes json operation for use with http api