toJson

fun toJson(session: String? = null, works: Boolean = false): JsonObject(source)

works adds pipedWorks for a check that can also be run where the program works.