Added postJson and putJson functions.