Lines Matching refs:skjson

58     explicit JsonReader(std::unique_ptr<skjson::DOM> dom)
72 if (ctx.fContainer->is<skjson::ObjectValue>()) {
73 return static_cast<const T*>(ctx.fContainer->as<skjson::ObjectValue>()[label]);
76 const skjson::ArrayValue* jarr = *ctx.fContainer;
90 const auto* jbool = this->readProp<skjson::BoolValue>(label);
96 const auto* jnum = this->readProp<skjson::NumberValue>(label);
110 const auto* jnum = this->readProp<skjson::NumberValue>(label);
116 const auto* jstr = this->readProp<skjson::StringValue>(label);
122 const auto* jarr = this->readProp<skjson::ArrayValue>(label);
131 const skjson::NumberValue* jnum = (*jarr)[i];
148 return ctx.fContainer->is<skjson::ObjectValue>()
149 ? ctx.fContainer->as<skjson::ObjectValue>().size()
150 : ctx.fContainer->as<skjson:: ArrayValue>().size();
154 const auto* jarr = this->readProp<skjson::ArrayValue>(label);
164 SkASSERT(fContextStack.back().fContainer->is<skjson::ArrayValue>());
169 const auto* jobj = this->readProp<skjson::ObjectValue>(label);
179 SkASSERT(fContextStack.back().fContainer->is<skjson::ObjectValue>());
188 case skjson::Value::Type::kObject: return this->openObjectBlock();
189 case skjson::Value::Type::kArray: return this->openArrayBlock();
197 const auto& container = ctx.fContainer->as<skjson::ObjectValue>();
201 if (m.fValue.is<skjson::ObjectValue>() || m.fValue.is<skjson::ArrayValue>()) {
217 const auto& container = ctx.fContainer->as<skjson::ArrayValue>();
221 if (m.is<skjson::ObjectValue>()) {
222 if (const skjson::StringValue* jtype = m.as<skjson::ObjectValue>()["type"]) {
241 const skjson::Value* fContainer;
245 const std::unique_ptr<skjson::DOM> fDom;
253 auto dom = std::make_unique<skjson::DOM>(json, len);
255 return dom->root().is<skjson::ObjectValue>() ? std::make_unique<JsonReader>(std::move(dom))