-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum JSON decoding/encoding methods #909
Comments
Example: PROTO FILE: }` exported TS file: `export interface Test { export enum Test_TestType { export function test_TestTypeFromJSON(object: any): Test_TestType { export function test_TestTypeToJSON(object: Test_TestType): string { export const Test = { |
* feat(ts-proto-#859): added encode-only options to toJSON methods * feat(ts-proto-#859): fixed error in implementation * feat(ts-proto#859): inverted fromJSON and toJSON methods to avoid changing all tests * feat(ts-proto#859): ran yarn format * feat(ts-proto-#859): updated docs and renamed methods to toOnly and fromOnly * feat: removed toJson/fromJSON enums when not used * feat(#909): ran format --------- Co-authored-by: Francesco Battista <francesco.battista@nbcuni.com>
# [1.157.0](v1.156.8...v1.157.0) (2023-09-03) ### Features * enum decoding ([#910](#910)) ([9e0a0b5](9e0a0b5)), closes [ts-proto-#859](https://github.com/ts-proto-/issues/859) [ts-proto#859](https://github.com/ts-proto/issues/859) [ts-proto#859](https://github.com/ts-proto/issues/859) [ts-proto-#859](https://github.com/ts-proto-/issues/859) [#909](#909)
Hi,
when using the toJSON/fromJSON only encoding feature, I've noticed that the ts-proto outputs the serializing methods for both of them regardless which one we're using.
I wanted to track this, even though I'm already taking care and provide the PR
The text was updated successfully, but these errors were encountered: