woonki

Results 237 comments of woonki

Can you give me a self-contained example? ```rescript module Address = { @spice type t = {street: string} } @spice type user = { name: string, address: Address.t, } let...

How about using `@spice.key(...)` for the fields?

```res @spice type t = { name: string, @spice.key("address_street") addressStreet: string, } ```

Can you elaborate your data and type definition you want decode json to? Concise example would be better to understand. Let me help you to make custom (d)encoder.

Sorry for the late reply. I think this is definitely possible with a custom (d)encoder. I'll try to come up with some code tonight or tomorrow.

There are three possible ways to do this 1. if a structure with a parent higher than user is possible, e.g. `{"data": user}` ```res @spice type address = { street:...

I've added the example for the solution 1, 2 in the examples directory. You can run on your local https://github.com/green-labs/ppx_spice/blob/main/examples/src/CustomCodecs2.res https://github.com/green-labs/ppx_spice/blob/main/examples/src/CustomCodecs3.res

Sorry for being late, is a PR opened in the Core for this?

I had same error. The error has gone now, after I add `configuration` that I made custom configuration of my project.

@jeong-sik Can you share your tips here?