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

generate json converter functions for krotoDC dataclasses #25

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

mscheong01
Copy link
Owner

@mscheong01 mscheong01 commented Mar 1, 2024

json converter functions toJson and fromJson are additionally generated.
ex)

public fun SimpleMessage.toJson(): String = JsonFormat.printer().print(this@toJson.toProto())

public fun SimpleMessage.Companion.fromJson(json: String): SimpleMessage =
    com.example.importtest.OuterClassNameTestProto.SimpleMessage.newBuilder().apply {
    JsonFormat.parser().ignoringUnknownFields().merge(json, this@apply) }.build().toDataClass();

The json serialization format is equal to the official format provided by protobuf-java-util

*** dependency protobuf-java-util has to be added

@mscheong01 mscheong01 self-assigned this Mar 1, 2024
@mscheong01
Copy link
Owner Author

#24

@mscheong01 mscheong01 added this to the 1.1.0 milestone Mar 1, 2024
@mscheong01 mscheong01 merged commit 6118696 into main Mar 1, 2024
2 checks passed
jrhee17 added a commit to line/armeria that referenced this pull request Apr 11, 2024
**Dependencies**

- Brave 6.0.0 -> 6.0.2
- Brotli4j 1.15.0 -> 1.16.0
- java-control-plane 1.0.42 -> 1.0.44
- Dropwizard 2.1.10 -> 2.1.12
- Dropwizard Metrics 4.2.24 -> 4.2.25
- Eureka 2.0.1 -> 2.0.2
- fastUtil 8.5.12 -> 8.5.13
- gRPC-Java 1.61.0 -> 1.63.0
- Guava 33.0.0-jre -> 33.1.0-jre
- Jackson 2.16.1 -> 2.17.0
- JCTools 4.0.2 -> 4.0.3
- Jetty10 10.0.19 -> 10.0.20
- Jetty11 11.0.19 -> 11.0.20
- Jetty12 12.0.5 -> 12.0.8
- Jetty9.4 9.4.52.v20230823 -> 9.4.54.v20240208
- Kotlin 1.9.22 -> 1.9.23
- kotlinx.coroutines 1.9.22 -> 1.9.23
- Kubernetes Client 6.10.0 -> 6.11.0
- Micrometer 1.12.2 -> 1.12.4
- Micrometer Tracing 1.2.2 -> 1.2.4
- Netty 4.1.106.Final -> 4.1.108.Final
- Netty io_uring 0.0.24.Final -> 0.0.25.Final
- protobuf-jackson 2.2.0 -> 2.5.0
- Reactor 3.6.2 -> 3.6.4
- RESTEasy 5.0.7.Final -> 5.0.9.Final
- Retrofit2 2.9.0 -> 2.11.0
- Sangria 4.0.2 -> 4.1.0
- Scala2.12 2.12.18 -> 2.12.19
- Scala2.13 2.13.12 -> 2.13.13
- Scala3 3.3.0 -> 3.4.1
- Spring6 6.1.3 -> 6.1.5
- Spring-Boot3 3.2.2 -> 3.2.4
- Tomcat8 8.5.98 -> 8.5.100
- Tomcat8 9.0.85 -> 9.0.87
- Tomcat8 10.1.18 -> 10.1.20
- Build
  - Apache HttpClient 5.3 -> 5.3.1
  - asm 9.6 -> 9.7
  - AssertJ 3.25.2 -> 3.25.3
  - Awaitility 4.2.1 -> 4.2.1
  - dagger 2.50 -> 2.51.1
  - dgs 8.2.2 -> 8.5.3
  - Error Prone 2.24.1 -> 2.26.1
  - GAX Java 2.40.0 -> 2.46.1
  - Gradle 8.5 -> 8.7
  - J2ObjC 2.8 -> 3.0.0
  - Java-WebSocket 1.5.5 -> 1.5.6
  - JUnit5 5.10.1 -> 5.10.2
  - Kafka 3.6.1 -> 3.7.0
  - krotoDC 1.0.6 -> 1.1.1
  - Gradle Nexus Publish Plugin 7.0.1 -> 7.0.2
  - SLF4J2 2.0.11 -> 2.0.12
  - Testcontainers 1.19.3 -> 1.19.7
  - Zookeeper 3.9.1 -> 3.9.2

**Additional Modifications**
- `closeAndReleaseStagingRepository` has been renamed to
`closeAndReleaseStagingRepositories`
  - gradle-nexus/publish-plugin#236
- `DnsErrorCauseException` has been introduced in Netty
  - netty/netty#13721
  - `DnsUtil#isDnsQueryTimedOut` has been updated to reflect this
- `RefreshingAddressResolver` now uses `DnsUtil#isDnsQueryTimedOut` to
determine cachability for consistency
- Note that users should sync versions between netty and armeria for
this release. Otherwise, a compliation error may occur.
- `krotodc` now requires the `protobuf-java-util` dependency
  - mscheong01/krotoDC#25
- Sangria has a breaking change regarding `DeprecationTracker`
  - sangria-graphql/sangria#1064
Dogacel pushed a commit to Dogacel/armeria that referenced this pull request Jun 8, 2024
**Dependencies**

- Brave 6.0.0 -> 6.0.2
- Brotli4j 1.15.0 -> 1.16.0
- java-control-plane 1.0.42 -> 1.0.44
- Dropwizard 2.1.10 -> 2.1.12
- Dropwizard Metrics 4.2.24 -> 4.2.25
- Eureka 2.0.1 -> 2.0.2
- fastUtil 8.5.12 -> 8.5.13
- gRPC-Java 1.61.0 -> 1.63.0
- Guava 33.0.0-jre -> 33.1.0-jre
- Jackson 2.16.1 -> 2.17.0
- JCTools 4.0.2 -> 4.0.3
- Jetty10 10.0.19 -> 10.0.20
- Jetty11 11.0.19 -> 11.0.20
- Jetty12 12.0.5 -> 12.0.8
- Jetty9.4 9.4.52.v20230823 -> 9.4.54.v20240208
- Kotlin 1.9.22 -> 1.9.23
- kotlinx.coroutines 1.9.22 -> 1.9.23
- Kubernetes Client 6.10.0 -> 6.11.0
- Micrometer 1.12.2 -> 1.12.4
- Micrometer Tracing 1.2.2 -> 1.2.4
- Netty 4.1.106.Final -> 4.1.108.Final
- Netty io_uring 0.0.24.Final -> 0.0.25.Final
- protobuf-jackson 2.2.0 -> 2.5.0
- Reactor 3.6.2 -> 3.6.4
- RESTEasy 5.0.7.Final -> 5.0.9.Final
- Retrofit2 2.9.0 -> 2.11.0
- Sangria 4.0.2 -> 4.1.0
- Scala2.12 2.12.18 -> 2.12.19
- Scala2.13 2.13.12 -> 2.13.13
- Scala3 3.3.0 -> 3.4.1
- Spring6 6.1.3 -> 6.1.5
- Spring-Boot3 3.2.2 -> 3.2.4
- Tomcat8 8.5.98 -> 8.5.100
- Tomcat8 9.0.85 -> 9.0.87
- Tomcat8 10.1.18 -> 10.1.20
- Build
  - Apache HttpClient 5.3 -> 5.3.1
  - asm 9.6 -> 9.7
  - AssertJ 3.25.2 -> 3.25.3
  - Awaitility 4.2.1 -> 4.2.1
  - dagger 2.50 -> 2.51.1
  - dgs 8.2.2 -> 8.5.3
  - Error Prone 2.24.1 -> 2.26.1
  - GAX Java 2.40.0 -> 2.46.1
  - Gradle 8.5 -> 8.7
  - J2ObjC 2.8 -> 3.0.0
  - Java-WebSocket 1.5.5 -> 1.5.6
  - JUnit5 5.10.1 -> 5.10.2
  - Kafka 3.6.1 -> 3.7.0
  - krotoDC 1.0.6 -> 1.1.1
  - Gradle Nexus Publish Plugin 7.0.1 -> 7.0.2
  - SLF4J2 2.0.11 -> 2.0.12
  - Testcontainers 1.19.3 -> 1.19.7
  - Zookeeper 3.9.1 -> 3.9.2

**Additional Modifications**
- `closeAndReleaseStagingRepository` has been renamed to
`closeAndReleaseStagingRepositories`
  - gradle-nexus/publish-plugin#236
- `DnsErrorCauseException` has been introduced in Netty
  - netty/netty#13721
  - `DnsUtil#isDnsQueryTimedOut` has been updated to reflect this
- `RefreshingAddressResolver` now uses `DnsUtil#isDnsQueryTimedOut` to
determine cachability for consistency
- Note that users should sync versions between netty and armeria for
this release. Otherwise, a compliation error may occur.
- `krotodc` now requires the `protobuf-java-util` dependency
  - mscheong01/krotoDC#25
- Sangria has a breaking change regarding `DeprecationTracker`
  - sangria-graphql/sangria#1064
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.

None yet

1 participant