All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.org.jetbrains.letsPlot.intern.PlotSpecUtil.kt Maven / Gradle / Ivy

There is a newer version: 4.8.0
Show newest version
/*
 * Copyright (c) 2021. JetBrains s.r.o.
 * Use of this source code is governed by the MIT license that can be found in the LICENSE file.
 */

package org.jetbrains.letsPlot.intern

import org.jetbrains.letsPlot.Figure
import org.jetbrains.letsPlot.commons.intern.json.JsonSupport

/**
 * Used in IDEA Plugin
 */
@Suppress("unused")
object PlotSpecUtil {
    @JvmStatic
    fun toSpecJson(fig: Figure): String {
        val spec = fig.toSpec()
        return JsonSupport.formatJson(spec)
    }

    @JvmStatic
    fun fromSpecJson(specJson: String): MutableMap {
        return JsonSupport.parseJson(specJson)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy