Test both json and buffers.