Pass and receive ids as JSON