-
Notifications
You must be signed in to change notification settings - Fork 73
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
Allowing comments #107
Comments
@devlaam Keeping However, your comment gave me an idea: instead of just using Thanks for your comment! I'm going to try this out and see if I can notice an improvement in benchmarks. |
|
Nice! Glad to be of service. In the mean time i forked your repro and made the adjustments for my use case. As speed is not my most importent goal i made a few changes as well and integrated the methods Simple/Complex into one method. A pull request seems to make less sense given the spirit of the answer you gave above, but i thought i'dd publish it anyway. Maybe others have similar use cases. |
Hi Erik,
Very nice piece of work indeed!
Recently i changed from play to your parser for my home brew json operator lib. Because I have quite a lot if "comments" in my json i forked your lib, and wanted to extend it so it can spit out comments or at least skip them. Due to the clarity of your code this is rather easy to do.
I have a question about one design decision you made though. You differentiate between
parseStringSimple
andparseStringComplex
, the only difference (from a performance point of view at least) seems to be the inspection of\\
. The price you pay is rescanning the string when it turns out not be simple after all. Was this the sole ground for have two separate methods here, or am I missing something? Would one extraif
statement in the scan make a big difference and not outweigh the disposal of work done?If not, i would integrate the methods scan regularly until the first
\\
and then, if this happens, switch to the collection into the CharBuilder. But, maybe you have already tested this and turned out to be a dead end.The text was updated successfully, but these errors were encountered: