On decomposing a case class Lift-JSON will pick a constructor to base it's decomposition on with the "primaryConstructorArgs"-function, which previously picked the first available constructor.
However, the JVM does not guarantee the ordering of constructors, so in the case of classes with multiple alternative available constructors, the behavior becomes unpredictable and indeterminable.
I fixed this so that "primaryConstructorArgs" always picks the declared Constructor with the most arguments, as I felt this is a more reasonable assumption on the primary constructor for a case class to be serialized to JSON.
Let me know if this is acceptable, or if you want any changes.
primaryConstructorArgs choosing wrong/inappropriate constructor issue…
added test for primaryConstructorArgs bugfix