Replies: 1 comment 1 reply
-
There's a similar discussion for |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm looking for a way to enumerate a
JsonElement
object properties, ideally free of heap allocations. Currently, I see two options for accessing the property name -JsonProperty.Name
andJsonProperty.NameEquals
(if I know the possible names). TheName
property however allocates a new string every time, and it doesn't seem to do any interning.Is there any other way? I'm looking for something like
Utf8JsonReader.CopyString(Span<byte> utf8Destination)
. I actually want the name in utf-8, so decoding it using theName
property just to encode it back feels quite dumb :]Beta Was this translation helpful? Give feedback.
All reactions