Log JSON-LD types

This commit is contained in:
M66B 2023-12-01 09:44:01 +01:00
parent d2368b49ab
commit c9867fbf40
1 changed files with 9 additions and 0 deletions

View File

@ -83,6 +83,15 @@ public class JsonLd {
private void getHtml(Object obj, int indent, Element holder) throws JSONException {
if (obj instanceof JSONObject) {
JSONObject jobject = (JSONObject) obj;
if (indent == 0 &&
jobject.has("@context") &&
jobject.has("@type")) {
String context = (jobject.isNull("@context") ? null : jobject.optString("@context"));
String type = (jobject.isNull("@type") ? null : jobject.optString("@type"));
Log.e("JSON-LD " + context + "=" + type);
}
Iterator<String> keys = jobject.keys();
while (keys.hasNext()) {
String key = keys.next();