diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-15 09:04:00 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-15 23:55:25 +0800 |
commit | 9719cf38e662e428ace8f3ebce9774a5338f0ce5 (patch) | |
tree | 07e441be8419b3161cedf449c2808bee082fe539 /libsolidity/interface/InterfaceHandler.cpp | |
parent | 0072160d7772b2f30c2c6af4428728cb31641696 (diff) | |
download | dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.gz dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.zst dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.zip |
Move InterfaceHandler from string to JSON
Diffstat (limited to 'libsolidity/interface/InterfaceHandler.cpp')
-rw-r--r-- | libsolidity/interface/InterfaceHandler.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libsolidity/interface/InterfaceHandler.cpp b/libsolidity/interface/InterfaceHandler.cpp index 1686f9ea..5705856c 100644 --- a/libsolidity/interface/InterfaceHandler.cpp +++ b/libsolidity/interface/InterfaceHandler.cpp @@ -8,7 +8,7 @@ using namespace std; using namespace dev; using namespace dev::solidity; -string InterfaceHandler::documentation( +Json::Value InterfaceHandler::documentation( ContractDefinition const& _contractDef, DocumentationType _type ) @@ -24,10 +24,9 @@ string InterfaceHandler::documentation( } BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Unknown documentation type")); - return ""; } -string InterfaceHandler::abiInterface(ContractDefinition const& _contractDef) +Json::Value InterfaceHandler::abiInterface(ContractDefinition const& _contractDef) { Json::Value abi(Json::arrayValue); @@ -104,12 +103,10 @@ string InterfaceHandler::abiInterface(ContractDefinition const& _contractDef) abi.append(event); } - Json::FastWriter writer; - writer.omitEndingLineFeed(); - return writer.write(abi); + return abi; } -string InterfaceHandler::userDocumentation(ContractDefinition const& _contractDef) +Json::Value InterfaceHandler::userDocumentation(ContractDefinition const& _contractDef) { Json::Value doc; Json::Value methods(Json::objectValue); @@ -129,10 +126,10 @@ string InterfaceHandler::userDocumentation(ContractDefinition const& _contractDe } doc["methods"] = methods; - return Json::StyledWriter().write(doc); + return doc; } -string InterfaceHandler::devDocumentation(ContractDefinition const& _contractDef) +Json::Value InterfaceHandler::devDocumentation(ContractDefinition const& _contractDef) { Json::Value doc; Json::Value methods(Json::objectValue); @@ -178,7 +175,7 @@ string InterfaceHandler::devDocumentation(ContractDefinition const& _contractDef } doc["methods"] = methods; - return Json::StyledWriter().write(doc); + return doc; } string InterfaceHandler::extractDoc(multimap<string, DocTag> const& _tags, string const& _name) |