Finatra JSON Parser

72 views
Skip to first unread message

Yogesh Shetty

unread,
Apr 14, 2017, 10:20:53 AM4/14/17
to finatra-users
Is there any way to use internal Finatra JSON parser in a standalone mode, at present Finatra internally takes care of serialization/deserialization but I was wondering if I could leverage same json parsing library in other parts of the code in a standalone mode. This will obviate the need for specialized JSON parser like circe which I am currently using. 

case class querypooltabdto(@RouteParam poolid:String)
 get("/pool/life")
  { request : querypoolgetdto =>
}

If anyone has figured this out, then would appreciate if you could share the library/class name with code example on how to do it. Thanks a lot. 

Christopher Coco

unread,
Apr 14, 2017, 1:23:32 PM4/14/17
to Yogesh Shetty, finatra-users
You can always just use the FinatraObjectMapper directly: https://github.com/twitter/finatra/blob/develop/jackson/src/main/scala/com/twitter/finatra/json/FinatraObjectMapper.scala.


There are examples throughout the tests (generally a good place to look for examples on how to do things) in the finatra/jackson codebase and integration tests in other places.

Thanks,
-c

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

Reply all
Reply to author
Forward
0 new messages