• Rehydrate a JSON AST (from Node#toJSON) back into the AST classes.

    const json = root.toJSON()
    // save to file, send by network, etc
    const root2 = postcss.fromJSON(json)

    Parameters

    • data: object

    Returns Node

  • Rehydrate a JSON AST (from Node#toJSON) back into the AST classes.

    const json = root.toJSON()
    // save to file, send by network, etc
    const root2 = postcss.fromJSON(json)

    Parameters

    • data: object[]

    Returns Node[]