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

is there a way to transform an entity back to json? #113

Closed
lidorcg opened this issue Feb 1, 2022 · 2 comments
Closed

is there a way to transform an entity back to json? #113

lidorcg opened this issue Feb 1, 2022 · 2 comments

Comments

@lidorcg
Copy link

lidorcg commented Feb 1, 2022

The main reason I ask is that js ecosystem is based on json and most tooling talks json.
Compelling as it may be committing to only use homebase entities without a very easy way back is too high of a price to pay.
I realise that the relations makes it a bit hard to "know where to stop" then I'm guessing query language is probably the right answer here, something like datomic/datascript q/pull would probably do the trick.

Loved the project (homebase-react & homebase) BTW, and I'm working on a POC that, if successful, might evolve to a large scale production use in our company.

@becomingbabyman
Copy link
Member

Hey @lidorcg. JSON support is certainly on the roadmap although probably not for the entity API. We're focusing more on the query and pull APIs going forward. Entity is great, but it has a bit too much magic and getting all that magic to work across the whole local-first pipeline was too heavy of a lift for the MVP we're working on.

Here's more info about why exporting JSON is difficult #97 (comment)

The next release of homebase-react will make fewer assumptions so it will have a slightly steeper learning curve, but converting from EDN -> JSON and back again will be much less complicated.

@lidorcg
Copy link
Author

lidorcg commented Feb 13, 2022

Sure thing! EDN <-> JSON sounds straightforward and a safe bet.
Problems starts when you closing yourself within "gardened objects" ;)

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

No branches or pull requests

2 participants