Working JSON version.