Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Boris Malenšek
@zmeda
New version (0.5.2) released.
Wojciech Langiewicz
@wlk
Thanks!
Jordan Gwyn
@emanresusername
w00t!
Boris Malenšek
@zmeda
what do you guys think: #64 ? Pls feedback.
Jordan Gwyn
@emanresusername
@zmeda ^^ sounds good to me
Jordan Gwyn
@emanresusername

@zmeda curious if this has come up in your work with scala + jsonapi. they talk about queryParams like ?field=1&nested[field]=2&nested[fields][]=3&nested[fields][]=4 and they’re supposed to be deserialized to

{field: 1, nested: {field: 2, fields: [3,4]}}

rails and sinatra both handle that automatically, but i haven’t found anything like that for scala or java, have you?

Jordan Gwyn
@emanresusername
@zmeda did zalando/scala-jsonapi#71 for boilerplate i was typing too much for comfort :sweat_smile:
Wojciech Langiewicz
@wlk
@emanresusername the JsonAPI is quite relaxed when it comes to query parameters, I think what you found was just the default rails behavior
handling of query parameters depends on the framework you are using, I have written a very simple library to do pagination for akka-http: https://github.com/lonelyplanet/akka-http-extensions#pagination-support we use it together with JsonAPI
Jordan Gwyn
@emanresusername
Yeah, I was more interested in the nested/array notation,
it's in RackUtils somewhere, I'd just taken it for granted in ruby land, apparently not a first class citizen anywhere else. fwp (-‸ლ)
Jordan Gwyn
@emanresusername
@zmeda when were you planning on the 0.5.3 release/publishing to maven?
Boris Malenšek
@zmeda
ATM I'm doing an update (to version and README). I'll also update contributing guidelines just to make explicit if you want a new version to be released please update version.sbt and README accordingly.
Boris Malenšek
@zmeda
@emanresusername v0.5.3 released.
Jordan Gwyn
@emanresusername
Oh, cool, will do next time, thanks!
Boris Malenšek
@zmeda
v0.5.4 released
Anyone have some good experiences and/or ideas how ti incorporate changelog as automatic as possible for Scala GH repos?
Jordan Gwyn
@emanresusername
@zmeda no idea how he’s doing it, but looks like lihaoyi has some sort of auto-build magic for ammonite commits http://www.lihaoyi.com/Ammonite/#UnstableVersions
Jordan Gwyn
@emanresusername
@zmeda any plans to do publish the 0.6.0 artifact?
Boris Malenšek
@zmeda
@emanresusername On it right now...
Jordan Gwyn
@emanresusername
:hooray:
Boris Malenšek
@zmeda
The release is done... sometimes it takes up to 10mins for sonatype to pick up the new artifact
so it should be available soon
Jordan Gwyn
@emanresusername
gif-keyboard-1886147713772020875.gif
Boris Malenšek
@zmeda
v0.6.1 released! thanks to @prahim
Boris Malenšek
@zmeda
v0.6.2 released
Jordan Gwyn
@emanresusername
starting on a branch supporting scala 2.12 i think i can handle the circe side pretty well, but might need some help on some of the other modules
Boris Malenšek
@zmeda
@emanresusername the idea is super cool but the problem is that most of the dependencies we use are not 2.12 ready yet (like akka-http, akka-http-spray-json, play-json etc). So at the moment it will be really hard to migrate to 2.12
but if you have some good strategy, let me know
Jordan Gwyn
@emanresusername
Ahh I see, well I try to at least break it up so each commit ports one module (as 2.12 support becomes available)
I don't know too much about spray or play :/ but I think akka-http should be 2.12 now
Jordan Gwyn
@emanresusername
oh whoa, i’ll submit a pr to the docs, they have a 2.12 version out
https://index.scala-lang.org/akka/akka-http/akka-http-core?target=_2.12
maybe they’re waiting till all the modules support it to put it in the docs ...
they have a spray-json module to which might handle the http-spray-json not being ready
https://index.scala-lang.org/akka/akka-http/akka-http-spray-json?target=_2.12
Jordan Gwyn
@emanresusername
made akka/akka-http#850 for clarifying that doc, will see what their reasoning was for only having 2.11 or if it was just an oversight
Jordan Gwyn
@emanresusername
@zmeda just saw zalando/scala-jsonapi#64
should i start on top of that? would also be easier to just ignore modules that don’t have 2.12 support yet
Boris Malenšek
@zmeda
#64 would prolly be the best place to start
Jordan Gwyn
@emanresusername
gaah, i got pretty far branched off master now :(
was a long day, but it’s all compiling!
i’m pretty far past “starting” though :sweat_smile:
will, see, maybe it won’t be too bad to reconcile once the tests turn green
Boris Malenšek
@zmeda
isn't there a PR to sync with master?
Jordan Gwyn
@emanresusername
oh yeah, there is :+1:
is there any eta on when you want to merge that in?
Jordan Gwyn
@emanresusername

i think i’m passed the point of diminishing returns for the day anyway :tired_face: https://github.com/RavelLaw/scala-jsonapi/tree/scala-2.12 if anybody else wants to chime in and see if that’s reasonable so far.
i’ll wait on #64 then take another stab after some time away
some thoughts from today
seems like, with spray going away, the akka http stuff should just be one level above the core and not depend on spray.
so the dependency graph i’d think should be like

core

models and implicits no external libs (seems like that’s already on track)

akka-http

would have maybe somethings to the effect of

// no real need for the `AkkaHttp` prefix since `spray-http` will be gone and everything is targeting the `akka-http` `HttpEntity`s now
trait JsonapiSupport[Model] {
implicit def stringToRootObject(string: String): RootObject = ???
implicit def rootObjectToString(rootObject): String = ???
//internal dependent json projects would implement the above
def modelToRootObject(from: Model): RootObject = ???
def modelFromRootObject(rootObject: RootObject): Model = ???
//external clients would implement the above in  with whatever (de)serialization stuff they like
implicit def jsonApiObjectWriter = new JsonApiObjectWriter[Model] {
override toRootObject(model: Model) = modeToRootObject(model)
}
implicit def jsonApiObjectReader = new JsonApiObjectReader[Model] {
override fromRootObject(rootObject: RootObject) = modeFromRootObject(rootObject)
}
// the following can be implemented using the preceding but more than i can do off the top of my head right now :sweat_smile:
implicit def modelMarshaller: ToEntityMarshaller[Model] = ???
implicit def modelUnmarshaller: FromEntityMarchaller[Model] = ???

circe, spray-json, play-json, etc

these guys then would essentially just be de/serializing strings to/from RootObjects using their respective json impls

Boris Malenšek
@zmeda
@emanresusername can you please review: zalando/scala-jsonapi#85
Jordan Gwyn
@emanresusername
:+1:
looks like it was already merged?
gif-keyboard-3294303299354340048.gif
Boris Malenšek
@zmeda
yes, u did miss it
i reviewed it and it seemed fine for me
Jordan Gwyn
@emanresusername
:+1:
Jordan Gwyn
@emanresusername
taking a new path on the [march to scala 2.12] (zalando/scala-jsonapi#93)
i think this perserves most all of the core models, implicits and circe functionality, and hopefully makes it easier to plug in the other backends
lmk what y’all think