Skip to content

Commit

Permalink
feat: expose what is next in unmarshal state
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Apr 22, 2024
1 parent 5a07e7d commit 58c1f8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions json/unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ func (s *UnmarshalState) Config() UnmarshalerConfig {
return *s.config
}

// WhatIsNext gets ValueType of relatively next json element
func (s *UnmarshalState) WhatIsNext() jsoniter.ValueType {
return s.inner.WhatIsNext()
}

// AnyTypeResolver returns the any type resolver.
func (s *UnmarshalState) AnyTypeResolver() anypb_resolver.AnyTypeResolver {
if s.config.AnyTypeResolver != nil {
Expand Down

0 comments on commit 58c1f8c

Please sign in to comment.