-
Notifications
You must be signed in to change notification settings - Fork 34
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
Updates docs with the custom codecs section #377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 thanks @fedefernandez !
docs/src/main/tut/core-concepts.md
Outdated
@@ -392,6 +392,14 @@ It also provides the instances for `org.joda.time.LocalDate` and `org.joda.time. | |||
* `import freestyle.rpc.marshallers.jodaTimeEncoders.pbd._` | |||
* `org.joda.time.LocalDate` and `org.joda.time.LocalDateTime` in `Avro` | |||
* `import freestyle.rpc.marshallers.jodaTimeEncoders.avro._` | |||
|
|||
**Note**: If you want to send one of these instances directly as a request or response through Avro, you need to provide an instance of `Marshaller`. [frees-rpc] provides the marshallers for `BigDecimal`, `LocalDate`, `LocalDateTime`, `org.joda.time.LocalDate` and `org.joda.time.LocalDateTime` in a separated package: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add fully qualified names in all the cases, for example: java.time.LocalDate
docs/src/main/tut/core-concepts.md
Outdated
**Note**: If you want to send one of these instances directly as a request or response through Avro, you need to provide an instance of `Marshaller`. [frees-rpc] provides the marshallers for `BigDecimal`, `LocalDate`, `LocalDateTime`, `org.joda.time.LocalDate` and `org.joda.time.LocalDateTime` in a separated package: | ||
* `BigDecimal` in `Avro` | ||
* `import freestyle.rpc.internal.encoders.avro.bigDecimal.marshallers._` | ||
* `LocalDate` and `LocalDateTime` in `Avro` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@@ -22,7 +22,7 @@ import org.joda.time._ | |||
|
|||
object JodaTimeUtil { | |||
|
|||
private[this] val initialDate = DateTime.now(DateTimeZone.UTC).withMillis(0) | |||
private[this] val initialDate = new DateTime(0, DateTimeZone.UTC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
And moves the marshaller instances to its own object.