568 {
570 return json(
nullptr);
571 }
572
573 auto arrPtr =
mValue->as_array();
574 if (arrPtr) {
575 if (idx < arrPtr->
size()) {
576 return json((*arrPtr)[idx]);
577 }
578 return json(
nullptr);
579 }
580
581 if (
auto p =
mValue->data.ptr<fl::vector<i16>>()) {
582 if (idx < p->
size())
return json(
static_cast<i64>((*p)[idx]));
583 }
else if (
auto p =
mValue->data.ptr<fl::vector<u8>>()) {
584 if (idx < p->
size())
return json(
static_cast<i64>((*p)[idx]));
585 }
else if (
auto p =
mValue->data.ptr<fl::vector<float>>()) {
586 if (idx < p->
size())
return json((*p)[idx]);
587 }
fl::shared_ptr< json_value > mValue
size_t size() const FL_NOEXCEPT