NewReadContext creates a new read context
(trackRef bool)
| 53 | |
| 54 | // NewReadContext creates a new read context |
| 55 | func NewReadContext(trackRef bool) *ReadContext { |
| 56 | return &ReadContext{ |
| 57 | buffer: NewByteBuffer(nil), |
| 58 | refReader: NewRefReader(trackRef), |
| 59 | trackRef: trackRef, |
| 60 | maxDepth: 128, // Default maximum nesting depth |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // Reset clears state for reuse (called before each Deserialize) |
| 65 | func (c *ReadContext) Reset() { |