MCPcopy Create free account
hub / github.com/argotorg/solidity / jsonPrint

Function jsonPrint

libsolutil/JSON.cpp:129–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127std::string jsonCompactPrint(Json const& _input) { return jsonPrint(_input, JsonFormat{JsonFormat::Compact}); }
128
129std::string jsonPrint(Json const& _input, JsonFormat const& _format)
130{
131 // NOTE: -1 here means no new lines (it is also the default setting)
132 std::string dumped = _input.dump(
133 /* indent */ (_format.format == JsonFormat::Pretty) ? static_cast<int>(_format.indent) : -1,
134 /* indent_char */ ' ',
135 /* ensure_ascii */ true
136 );
137
138 return dumped;
139}
140
141bool jsonParseStrict(std::string const& _input, Json& _json, std::string* _errs /* = nullptr */)
142{

Callers 15

jsonPrettyPrintFunction · 0.85
jsonCompactPrintFunction · 0.85
runMethod · 0.85
prettyPrintedMethod · 0.85
compileMethod · 0.85
printMethod · 0.85
handleEVMAssemblyMethod · 0.85
handleIRAstMethod · 0.85
handleYulCFGExportMethod · 0.85
handleIROptimizedAstMethod · 0.85
handleABIMethod · 0.85

Calls

no outgoing calls

Tested by 3

runMethod · 0.68
prettyPrintedMethod · 0.68