string_t::object_type decode_string()

in src/codec/string.cpp [159:168]


string_t::object_type decode_string(decode_context &context) {
  const auto begin_simple = context.position;
  detail::skip_any_simple_characters(context);

  switch (detail::next(context, "Unterminated string")) {
    case '"': return std::string(begin_simple, context.position - 1);
    case '\\': return decode_escaped_string(context, begin_simple);
    default: json_unreachable();
  }
}