now also accepts already decoded json