#!/usr/bin/env groovy @Grab('com.google.code.gson:gson:2.3.1') import com.google.gson.*; def gson = new GsonBuilder().setPrettyPrinting().create(); def jp = new JsonParser(); System.in.eachLine { line -> def je = jp.parse(line); println(gson.toJson(je)); }
No comments:
Post a Comment