Use binary for building json query