Skip to content

androidPluto/json-render-view

Repository files navigation

JSONREnderView

Utility to render JSON in a readable format. This also supports expand & collpase functionality.

Integration

Add JSONRenderView to xml

<com.jsonrenderview.JsonRenderView
    android:id="@+id/json"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

Apply configuration (optional)

binding.json.applyConfig(
    Config.Builder()
        .keyObjectColor(...)
        .keyFieldColor(...)
        .valueNumberColor(...)
        .valueBooleanColor(...)
        .valueStringColor(...)
        .build()
)

Bind JSON content to view

binding.json.bind(jsonContent)

Perform actions

Expand & Collapse JSON tree

binding.json.action.expand()
binding.json.action.collapse()

About

Utility to render JSON strings in readable format

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages