-
-
Notifications
You must be signed in to change notification settings - Fork 325
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 it possible to opt out of dot notation or escape dot for field names? #639
Comments
After investigating the implementation, how open would you be to accepting a path array (tuple, in TypeScript terms) as an argument? Using a string to represent these escaped field names is not "full-proof" since there'll always be something that may need some form of escaping or a character that we pick that we need to treat specially. This increases complexity on the TypeScript utility functions significantly. I see that we're already converting these Here are some examples of proposals and what their field
I do like today's fieldApi name type-checking in that one field can only be specified in one way. I don't like to introduce multiple ways of specifying a field (e.g. accepting |
@chrisirhc let me run this idea past the other maintainers. Admittedly, I'm kinda against the idea, but I seemingly can't rationalize my thoughts other than "Oh god the types as-is are so complex I don't want to remove or touch them" but the more I think about it the more I realize this API would probably fix the types, not make them more complex. Even so, I'm only human and the idea of throwing away a huge amount of work gives me a physical migraine haha. |
No worries, sounds good. I think I understand where you're coming from. |
After talking with @fulopkovacs, I don't think we're going to move forward with this API. Here's why:
That said, we deeply appreciate your help figuring out our path and we may revisit this sometime in the future (say 2.0) if enough community feedback indicates that this is something they're wanting. Moreover, we suggest that instead of backticks and hard-to-read Thanks (and sorry) once again 😄 |
Discussed in #532
Originally posted by chrisirhc December 27, 2023
I'm considering migrating a project this library but there are field names containing dots
x.y
but these aren't to indicate nested fields.Is there a way to opt-out of the path behavior? I do see the value in this feature but could there be a capability to escape the field names perhaps (e.g.
x\.y\.z
)?I'm happy to contribute this feature but want to understand if any interest.
The text was updated successfully, but these errors were encountered: