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

Provide time and regex encoding functions #1

Open
TBBle opened this issue Jan 11, 2010 · 1 comment
Open

Provide time and regex encoding functions #1

TBBle opened this issue Jan 11, 2010 · 1 comment

Comments

@TBBle
Copy link

TBBle commented Jan 11, 2010

Currently the README for bert.erl specifies that the module user must encode their own date and regexes, but doesn't provide functions to implement the spec for this.

It'd be really handy if a couple of utility functions were included in the bert module for doing this, and maybe even if there was a way to actually tag an already-encoded date or regex so that bert:encode/1 doesn't double-encode it. Maybe simply skipping any tuple that looks like a BERT-encoded time or regex?

I'm not totally sure about this last part, as it seems there's a risk of failing to encode a tuple that happens to look like a date {bert, date, int(), int(), int() } or regex, but I guess that's uncommon enough to not be a problem, given I see no countermeasures against the inverse problem on the decoding side.

@TBBle
Copy link
Author

TBBle commented Jan 11, 2010

Huh, I just noticed that bert:decode_term/1 doesn't decode regexes or times either. So maybe that should be supported? Depends on the rationale for not having that support in bert:decode_term/1 already.

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

1 participant