| 3918 | } |
| 3919 | |
| 3920 | const char_type* as_cstring() const |
| 3921 | { |
| 3922 | switch (storage_kind()) |
| 3923 | { |
| 3924 | case json_storage_kind::short_str: |
| 3925 | return cast<short_string_storage>().c_str(); |
| 3926 | case json_storage_kind::long_str: |
| 3927 | return cast<long_string_storage>().c_str(); |
| 3928 | case json_storage_kind::const_json_ref: |
| 3929 | return cast<const_json_ref_storage>().value().as_cstring(); |
| 3930 | case json_storage_kind::json_ref: |
| 3931 | return cast<json_ref_storage>().value().as_cstring(); |
| 3932 | default: |
| 3933 | JSONCONS_THROW(json_runtime_error<std::domain_error>("Not a cstring")); |
| 3934 | } |
| 3935 | } |
| 3936 | |
| 3937 | basic_json& at(const string_view_type& key) |
| 3938 | { |
no test coverage detected