treeform / jsony

A loose, direct to object json parser with hooks.
MIT License
266 stars 34 forks source link

Skip pragma fixes #50 #51

Closed creikey closed 11 months ago

creikey commented 2 years ago

Would close #50

treeform commented 2 years ago

Cool idea! Sorry I don't like the pragma approach:

  1. I liked the skip hook approach in the issue. I would like to keep everything on a single system - hook based.

  2. I feel like pragmas pollute the structure definition which might have nothing to do with JSON.

Also please add tests and also please make sure they pass even in JS mode.

creikey commented 2 years ago

Cool idea! Sorry I don't like the pragma approach:

  1. I liked the skip hook approach in the issue. I would like to keep everything on a single system - hook based.
  2. I feel like pragmas pollute the structure definition which might have nothing to do with JSON.

Also please add tests and also please make sure they pass even in JS mode.

Wouldn't the skip hook not run at compile time worsening performance because of the string compares?

pietroppeter commented 11 months ago

this can be closed since https://github.com/treeform/jsony/pull/57 was merged