Extending rapture-json with preserving independent backend

13 views
Skip to first unread message

Boris Malenšek

unread,
Feb 2, 2015, 8:17:34 AM2/2/15
to raptur...@googlegroups.com
Hi!

First of all this rapture-json looks promising. Great job!

I want to enhance my siren-scala library with rapture-json support and still preserve the different backend (play, spray, json4s,...) support. I want end users to decide which backend they want to use.
I have no idea how/which rapture-json dependency I have to introduce to my library.
As an output I imagine for siren-scala library users to add dependency like: "siren-scala-[backend]".

Thanks for any ideas!

All the best,
Boris

Jon Pretty

unread,
Feb 2, 2015, 8:49:49 AM2/2/15
to raptur...@googlegroups.com
Hi Boris,

This is great! You could be the first third party library to depend on Rapture JSON (that I know of)!

First of all, you will need to depend on just "rapture-json". That's the common dependency of all the backend projects. Then your users will need to depend on "siren-scala" plus "rapture-json-[backend]". There are other ways of doing it, but this saves you publishing once for each backend.

In code, I think your users would need to import the appropriate `rapture.json.jsonBackends.<backend>._` package before starting to work with Siren.

I've had a brief look at siren-scala. Do you think you would be providing your own extractors and serializers for a `Siren` type, or something where Rapture is more transparent? I'm happy to help with working out the correct extension points!

Looking forward to finding out more!
Jon

--
You received this message because you are subscribed to the Google Groups "Rapture users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapture-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jon Pretty | @propensive
Reply all
Reply to author
Forward
0 new messages