memgraph/storage/model/json/string.hpp
2015-12-07 21:51:55 +01:00

32 lines
430 B
C++

#pragma once
#include "primitive.hpp"
namespace json
{
class String final : public Primitive<std::string>
{
public:
String() {}
String(const std::string& value)
: Primitive<std::string>(value) {}
virtual bool is_string() const;
virtual operator std::string() const;
};
bool String::is_string() const
{
return true;
}
String::operator std::string() const
{
return "\"" + value + "\"";
}
}