Fixing error with json output for KeyValueTables