berdon / zig-json

Simple zig JSON parsing library with a focus on friendly API.
MIT License
27 stars 9 forks source link

Publicize JsonValue So It Can Be Passed Around #5

Closed tekktonic closed 6 months ago

tekktonic commented 6 months ago

My zig is rusty so I'm probably just holding it wrong, but when trying to pass a JsonValue around the compiler errors out complaining that JsonValue isn't marked as pub.

An obvious case for this is json of the form

{
    "type": "some_understood_type",
    "payload": {....}
}

where I'd probably want to switch on type and feed root.payload into various handlers.

berdon commented 6 months ago

I'm not ignoring this - been out at a conference the past week and haven't had time to properly dig in.

tekktonic commented 6 months ago

No worries! I have another branch over on my account which publicizes JsonValue and it doesn't seem to break anything. I think it's branched off of my fix for building on 0.12 but since it's literally a one line change it's probably not worth opening a PR for anyway.

tekktonic commented 6 months ago

While I've got you here anyway: do you mind PRs via e-mail? I might knock deep equality together when I have a bit of time and I really don't like github c:

berdon commented 6 months ago

Up to you 👍; I appreciate the PRs however they manifest.

berdon commented 6 months ago

Should be fixed btw.

berdon commented 6 months ago

@tekktonic Have you had a chance to test this? It should be fixed but wanted to check in since you've been recent active.

tekktonic commented 6 months ago

Hey, I'll try to get to it this weekend if I can. It's been a busy week for me due to family things :)

tekktonic commented 6 months ago

Correction: next week. I forgot that the code I wrote this patch for originally is on my desktop, I'm currently on the other side of the state.

tekktonic commented 5 months ago

merged PR looks good to me. Just got back in last night :+1: