Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 20 12:24

    alexarchambault on main

    Update scala-library to 2.12.17… (compare)

  • Sep 20 12:24
    alexarchambault closed #314
  • Sep 20 12:24
    alexarchambault synchronize #313
  • Sep 20 12:20

    alexarchambault on main

    Update sbt-mima-plugin to 1.1.1… (compare)

  • Sep 20 12:20
    alexarchambault closed #312
  • Sep 19 12:30
    scala-steward opened #314
  • Sep 19 12:30
    scala-steward opened #313
  • Sep 19 12:30
    scala-steward opened #312
  • Sep 14 08:28
    alexarchambault closed #311
  • Sep 14 08:28

    alexarchambault on main

    Update shapeless to 2.3.10 (#31… (compare)

  • Sep 13 12:12
    scala-steward opened #311
  • Sep 13 09:23
    alexarchambault closed #310
  • Sep 13 09:23

    alexarchambault on main

    Update utest to 0.8.1 (#310) (compare)

  • Sep 09 12:20
    scala-steward opened #310
  • Sep 05 08:28

    alexarchambault on main

    Update refined to 0.10.1 (#307) (compare)

  • Sep 05 08:28
    alexarchambault closed #307
  • Sep 05 08:28

    alexarchambault on main

    Update nscplugin, sbt-scala-nat… (compare)

  • Sep 05 08:28
    alexarchambault closed #309
  • Sep 03 12:04
    scala-steward opened #309
  • Aug 15 16:19

    alexarchambault on github_actions

    (compare)

Miles Sabin
@milessabin
It looks like the basic example in the README fails with Scala 2.10.4.
Alexandre Archambault
@alexarchambault
Strange
Miles Sabin
@milessabin
Ahh ... hang on. Of course.
The paradise plugin is needed for 2.10.x ... that should probably be documented for argonaut-shapeless users.
Actually, all of your shapeless-2.1.0 using projects that support 2.10.x.
Alexandre Archambault
@alexarchambault
That's what I was about to ask you :)
Worth adding in the README yes
Miles Sabin
@milessabin
Heads up: 2.1.0 final has just been published :-)
Alexandre Archambault
@alexarchambault
Thanks! I should publish a new version today (after some minor adjustments)
Srepfler Srdan
@schrepfler
hi @alexarchambault, I've just started playing with Scala and having to deal a bit with XML I stumbled onto scalaxb, the xsd schema to type-classes+case-classes looks awesome but I've noticed the case classes sit within structures called DataRecord so in a way it mingles what is typically called the model and this DataRecord which looks like a metamodel facility to help with the inhering xml structure and ability to have various elements from different grammars (namespaces) sit on the same xml tree level
is there a way to use argonaut to take this generated model and convert it to for example JSON on the fly?
in a way ignoring the DataRecord classes
Alexandre Archambault
@alexarchambault
hi @schrepfler I had a quick look at a project of mine using scalaxb, with lots of generated case classes and ADTs
I can't find any field of type DataRecord in these
Srepfler Srdan
@schrepfler
hm
Alexandre Archambault
@alexarchambault
there are various issues I think you may run into trying to convert to JSON some of these
regarding some specific types scalaxb uses (javax.xml.datatype.XMLGregorianCalendar, scalaxb.Base64Binary, for example - you'll have to provide json codec for these specific types)
and also its ADTs: these are not sealed (it declares things like trait Something instead of sealed trait Something), which shapeless Generic will not like
but do you have a specific example of a generated case class with DataRecord? I can't find some in my model, but there may be in some others
Srepfler Srdan
@schrepfler
then you are lucky-er than me :))
Alexandre Archambault
@alexarchambault
(don't know if I'd been that lucky, I had to manually edit the generated code IIRC :-)
but if you have some generated code with a DataRecord, put it in a gist, I'll have a look at it
Srepfler Srdan
@schrepfler
let me show you an instance of how it composed the case classes in one instance
reqBetBuild: com.tralala.package.OxiModel = OxiModel(DataRecord(request,Request(ReqClientAuth(DataRecord(ReqClientAuthSequence1(tralala,someval,None,None,None)),Map(@returnToken -> DataRecord(N), @trustedMethod -> DataRecord(accountNo))),DataRecord(reqBetBuild,ReqBetBuild(Some(Token(List(DataRecord(11111111AD)),Map())),Some(CONTINUE),Some(M),None,None,List(DataRecord(outcomeGroup,OutcomeGroup(1,List(49285))), DataRecord(outcomeGroup,OutcomeGroup(2,List(49297))), DataRecord(outcomeGroup,OutcomeGroup(3,List(49291))), DataRecord(outcomeGroup,OutcomeGroup(4,List(49285, 49297, 49291)))),Map(@returnComplexCombinations -> DataRecord(Y), @returnFreebetTokens -> DataRecord(N), @returnOutcomeDetails -> DataRecord(N)))),Map())),Map(@version -> DataRecord(69.0)))
I think it's because the base document schema is very loose as well
Alexandre Archambault
@alexarchambault
@schrepfler you know you can format code multi-line code, with triple backquotes, like
code
and write multi-lines messages by pressing shift+enter to go to the next line