RESTful Service Layer


#1

Hi all,

What would you recommend if I want to develop a RESTful service layer serving JSON?
Kara? Node.kt?
What would you use for JSON processing/marshalling/unmarshalling?

Thanks,


#2

Node.kt just uses Jackson under the hood, and it works reasonably well with Kotlin. I did add some String extensions so you can do things like:

var someString = "...";

var someObject = someString.json();

...

someString = someObject.toJsonString();

But other than that, Node.kt doesn’t add too much to Jackson and uses it directly.

Node.kt is in early days, so expect some issues, but I’m using it for a few of my personal projects and am feeling good about it. I’d say Kotlin itself is a bit more of a risk than Node.kt, since the latter is just built on top of pretty solid libraries.


#3

I'd also say that it would be awesome to have someone at least attempt to use Node.kt, if just to get some feedback on the overall development model. The point of it is to be really straightforward to get up and running, so if you do give it a shot, please post any of your impressions (be blunt!).


#4

Thanks for the prompt response Jon. I wanted to give Node.kt a try anyway so I'll take this as an opportunity to explore it. I have a busy weekend ahead but I'm hoping to do that the following weekend. In the meantime I'll see what people will recommend.


#5

No problem at all. You can count on my feedback if/when I use it. You share the project with the community. Some feedback is the least I can do. ;)


#6

You can use Jersey with Kotlin. You can find a small example here.