If you need to integrate directly with the madman library, follow the below steps
Add the jitpack dependency in your root build.gradle
allprojects {
/** | |
* Type Adapter for {@link JsonArray} | |
*/ | |
public static final class JsonArrayTypeAdapter extends TypeAdapter<JsonArray> { | |
@Override | |
public void write(JsonWriter out, JsonArray value) throws IOException { | |
JsonElementTypeAdapter.writeJsonElement(out, value); | |
} |
/** | |
* Type Adapter for {@link JsonObject} | |
*/ | |
public static final class JsonObjectTypeAdapter extends TypeAdapter<JsonObject> { | |
@Override | |
public void write(JsonWriter out, JsonObject value) throws IOException { | |
JsonElementTypeAdapter.writeJsonElement(out, value); | |
} |
import requests | |
import argparse | |
import re | |
argparser = argparse.ArgumentParser(add_help=True) | |
argparser.add_argument('url', | |
help='Enter the url, include http/https also') | |
url = argparser.parse_args().url |
import com.google.gson.Gson; | |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonNull; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonPrimitive; | |
import com.google.gson.JsonSyntaxException; | |
import com.google.gson.TypeAdapter; | |
import com.google.gson.internal.JsonReaderInternalAccess; | |
import com.google.gson.internal.LinkedTreeMap; |