JSON in QueryResult should always be indented

Some APIs return the wrong Content-Type 'application/html', but valid
JSON as payload. In this cases the data is still typeof object and a
indented JSON makes it easier to work with.

However JSON folding and highlighting will still be off in this case.
This commit is contained in:
André Glüpker 2023-10-31 11:58:09 +01:00
parent 820e3033ea
commit 76a26b634d

View File

@ -32,7 +32,7 @@ const formatResponse = (data, mode) => {
return data;
}
return safeStringifyJSON(data);
return safeStringifyJSON(data, true);
};
const QueryResult = ({ item, collection, data, dataBuffer, width, disableRunEventListener, headers, error }) => {