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

Hydration of values starting with colon #77

Open
martinklepsch opened this issue Jul 14, 2016 · 2 comments
Open

Hydration of values starting with colon #77

martinklepsch opened this issue Jul 14, 2016 · 2 comments

Comments

@martinklepsch
Copy link
Collaborator

When storing a map like {:body ":D"} this gets converted to a keyword during hydration even though it is intended to be a string.

Maybe encoding special values in tuples [:matchbox.core/keyword ":abc/world"] would be an option but I'm not sure how feasible this is.

@crisptrutski
Copy link
Owner

The default behaviour is pretty overboard on the magic, and others have also had trouble. Took the cowards approach of making this user configurable, see #75

Using an array (ie. JS objects which just happen to have numeric keys, in Firebase) may be a bit too heavy on bandwidth, object allocation on sync and/or break certain kinds of queryabiity, so definitely some trade offs.

Having a default strategy that doesn't just assimilate all the ":strings" would be welcome though - perhaps contribute a strategy? Hopefully the pattern I took is self obviously and pleasant enough.

Not sure how far you want to take the "tagged literal" vocabulary, this obviously extends to dates, symbols, characters and a whole bunch of other scalar values.

@crisptrutski
Copy link
Owner

And then theres still sets, queues, ordered maps, etc as another dimention

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