ion-js
ion-js copied to clipboard
allow new annotations to be added via Writer.writeValue()
Customers' desired use case is to read value {a: ...} and write x::y::z::{a: ...} using Writer.writeValue(Reader), whereas the current implementation only pulls annotations from the Reader passed to that method. Note that this library currently allows customers to accomplish this by modifying the reader's state (see #319) -- but this feels like a bad practice (see #331).
It is unclear what the expectation is if annotations are found on the reader and specified on the writer. Perhaps ion-java's implementation of Writer.addTypeAnnotations() can provide some insight on this.