added a generic json version