Open tomatohf opened 9 years ago
@tomatohf I'm glad to hear you used the Binding interface; I was responsible for those changes and have recently submitted a pull-request to include my play-json
integration: https://github.com/SpinGo/handlebars.scala/commit/4a7483460122bfab30fac8a5d1b3340d08f599d7
With which JSON library did you integrate?
Being able to bind to a JSON AST allowed us to seamlessly render handlebars templates in both JS land and Scala land, and it worked out relatively well.
Nice catch on your fix, BTW.
@timcharper We integrated lift-json
. And we are also using handlebars as templates in both JS and Scala.
Great; do you have the code somewhere? I could help review it and get it ready for merge. The play-json
integration was merged into handlebars primary.
I have the code in our private github repository. It seems there would be another pull request ? If so, could you please point me out where to put the code. Or, other way preferred?
You could just post a gist
Sent from my iPhone
On Sep 1, 2015, at 08:18, Tomato notifications@github.com wrote:
I have the code in our private github repository. It seems there would be another pull request ? If so, could you please point me out where to put the code. Or, other way preferred?
— Reply to this email directly or view it on GitHub.
I just found play-json under the addon folder ...
ok, I will add a gist
Here it is => https://gist.github.com/tomatohf/e54bc169da2a2425343f
Well, lol here we are 5 months later!
I merged your gist and made a few modifications to it; it's here: https://github.com/mwunsch/handlebars.scala/tree/lift-json
Could you write some tests for it? Just mimic the tests for the play-json bindings. Then we'll be good to merge it in.
Thanks!
Sure, I'm glad to add some tests just like what play-json bindings does in addons directory. While would it be better do that in a new pull request based on the lift-json branch?
@tomatohf sure! Pull request to lift-json branch would be optimal. Or, you could just amend the commit from the lift-json branch and send a pull request for master.
Hi Mark,
We have used your great Scala implementation of Handlebars in our product qiaobutang.com , and we'd like to join to make it better ~ :-)
BTW, it's glad to extend the Binding interface, we implemented a new Binding to fill json format values and avoid runtime reflection.