Finally got the json stuff working