Skip to content
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

Andersfugmann/json support #5

Merged
merged 30 commits into from
Mar 3, 2024
Merged

Conversation

andersfugmann
Copy link
Owner

Closes #4

@andersfugmann
Copy link
Owner Author

Ready for review. Basic functionality is there, but not tested against a reference implementation.

@andersfugmann andersfugmann marked this pull request as ready for review February 28, 2024 21:54
@andersfugmann andersfugmann merged commit 9f4e10c into main Mar 3, 2024
4 checks passed
@andersfugmann andersfugmann deleted the andersfugmann/json_support branch March 3, 2024 19:44
andersfugmann added a commit to andersfugmann/opam-repository that referenced this pull request Apr 13, 2024
CHANGES:

### New features
- [x] Implement json serialization and deserialization (andersfugmann/ocaml-protoc-plugin#5)
- [x] Support special json mapping for google types (andersfugmann/ocaml-protoc-plugin#9)
- [x] Add deprecation annotations for deprecated fields, services etc (andersfugmann/ocaml-protoc-plugin#8)
- [x] Add option to prefix generated files with their package name
- [x] Copy documentation from proto files into generated ocaml bindings

### Bug fixes
- [x] Fix file output name if files contains a '-'
- [x] Resolve bug for Request/Response module aliases leading to
generating uncompilable code. (andersfugmann/ocaml-protoc-plugin#21)
- [x] Fix codegen bug for messages with out fields and setting
singleton_records = true (andersfugmann/ocaml-protoc-plugin#20)
- [x] In Services, the package field is now correctly set to None if
      the service if not defined in a package scope (andersfugmann/ocaml-protoc-plugin#24)

### Misc changes
- [x] Unify serialization and deserialization spec and optimize oneof
      handling
- [x] Simplify types used in code generation to improve readaility
- [x] *Replace `val name': unit -> string` with `val name: unit ->
string` which will only return the full protobuf name
- [x] Optimize merge functions by applying eager evaluation
- [x] Change signature of `to_proto'` to return unit and not a writer

(`*` indicates breaking change)

### Notes
  `Message.name': unit -> string` has been renamed to `Message.name:
  unit -> string`, and is now contains the fully qualified protobuf
  message name. Before the name was the ocaml module name of the
  message.

  `Service.Message` signature has been deprecated and replaced with
  `Spec.Message` signature. `Service.Message` is now an alias for
  `Spec.Message` and will be removed in future releases.
andersfugmann added a commit to andersfugmann/opam-repository that referenced this pull request Apr 13, 2024
CHANGES:

### New features
- [x] Implement json serialization and deserialization (andersfugmann/ocaml-protoc-plugin#5)
- [x] Support special json mapping for google types (andersfugmann/ocaml-protoc-plugin#9)
- [x] Add deprecation annotations for deprecated fields, services etc (andersfugmann/ocaml-protoc-plugin#8)
- [x] Add option to prefix generated files with their package name
- [x] Copy documentation from proto files into generated ocaml bindings

### Bug fixes
- [x] Fix file output name if files contains a '-'
- [x] Resolve bug for Request/Response module aliases leading to
generating uncompilable code. (andersfugmann/ocaml-protoc-plugin#21)
- [x] Fix codegen bug for messages with out fields and setting
singleton_records = true (andersfugmann/ocaml-protoc-plugin#20)
- [x] In Services, the package field is now correctly set to None if
      the service if not defined in a package scope (andersfugmann/ocaml-protoc-plugin#24)

### Misc changes
- [x] Unify serialization and deserialization spec and optimize oneof
      handling
- [x] Simplify types used in code generation to improve readaility
- [x] *Replace `val name': unit -> string` with `val name: unit ->
string` which will only return the full protobuf name
- [x] Optimize merge functions by applying eager evaluation
- [x] Change signature of `to_proto'` to return unit and not a writer

(`*` indicates breaking change)

### Notes
  `Message.name': unit -> string` has been renamed to `Message.name:
  unit -> string`, and is now contains the fully qualified protobuf
  message name. Before the name was the ocaml module name of the
  message.

  `Service.Message` signature has been deprecated and replaced with
  `Spec.Message` signature. `Service.Message` is now an alias for
  `Spec.Message` and will be removed in future releases.
andersfugmann added a commit to andersfugmann/opam-repository that referenced this pull request Apr 13, 2024
CHANGES:

- [x] Implement json serialization and deserialization (andersfugmann/ocaml-protoc-plugin#5)
- [x] Support special json mapping for google types (andersfugmann/ocaml-protoc-plugin#9)
- [x] Add deprecation annotations for deprecated fields, services etc (andersfugmann/ocaml-protoc-plugin#8)
- [x] Add option to prefix generated files with their package name
- [x] Copy documentation from proto files into generated ocaml bindings

- [x] Fix file output name if files contains a '-'
- [x] Resolve bug for Request/Response module aliases leading to
generating uncompilable code. (andersfugmann/ocaml-protoc-plugin#21)
- [x] Fix codegen bug for messages with out fields and setting
singleton_records = true (andersfugmann/ocaml-protoc-plugin#20)
- [x] In Services, the package field is now correctly set to None if
      the service if not defined in a package scope (andersfugmann/ocaml-protoc-plugin#24)

- [x] Unify serialization and deserialization spec and optimize oneof
      handling
- [x] Simplify types used in code generation to improve readaility
- [x] *Replace `val name': unit -> string` with `val name: unit ->
string` which will only return the full protobuf name
- [x] Optimize merge functions by applying eager evaluation
- [x] Change signature of `to_proto'` to return unit and not a writer

(`*` indicates breaking change)

  `Message.name': unit -> string` has been renamed to `Message.name:
  unit -> string`, and is now contains the fully qualified protobuf
  message name. Before the name was the ocaml module name of the
  message.

  `Service.Message` signature has been deprecated and replaced with
  `Spec.Message` signature. `Service.Message` is now an alias for
  `Spec.Message` and will be removed in future releases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add json encoding/decoding
1 participant