https://kotlinlang.org logo
Title
c

camdenorrb

08/01/2018, 1:10 AM
@karelpeetersYes, but you can't do that directly on an object
k

karelpeeters

08/01/2018, 1:11 AM
What's that?
c

camdenorrb

08/01/2018, 1:11 AM
What's what?
k

karelpeeters

08/01/2018, 1:12 AM
What can't you do on an object?
c

camdenorrb

08/01/2018, 1:12 AM
Make it pretty print
You have to first convert it to a json object
Do you see the issue?
k

karelpeeters

08/01/2018, 1:14 AM
Ah is this about the conversation from two weeks ago?
Might have to give a bit of a reminder next time 😒imple_smile:
c

camdenorrb

08/01/2018, 1:14 AM
Yeah
Here is an issue on the topic
k

karelpeeters

08/01/2018, 1:16 AM
I don't really get the question, klaxon is a JSON library, hence it includes a feature to pretty print JSON. It also includes some stuff to convert instances to JSON.
It it not a data-class-pretty-printing-as-json library.
c

camdenorrb

08/01/2018, 1:16 AM
I didn't say it was
I'm saying their implementation is silly, since you first have to serialize it just to parse it again then to serialize it again with pretty print
k

karelpeeters

08/01/2018, 1:23 AM
My bad that is indeed weird.
There's no way to convert an instance to a JsonObject directly?
c

camdenorrb

08/01/2018, 2:35 AM
I don't believe so
k

karelpeeters

08/01/2018, 9:10 PM
@camdenorrb found a way 🙂
c

camdenorrb

08/02/2018, 3:28 AM
@karelpeeters How?