Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/runConfigurations/iosApp.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# 🌳 JsonTree

![](https://img.shields.io/maven-central/v/com.sebastianneubauer.jsontree/jsontree) ![](https://img.shields.io/badge/Kotlin-1.9.23-orange) ![](https://img.shields.io/badge/SDK-21+-brightgreen) ![](https://img.shields.io/badge/Android_Weekly-Issue_584-yellow)
![](https://img.shields.io/maven-central/v/com.sebastianneubauer.jsontree/jsontree) ![](https://img.shields.io/badge/Kotlin-2.0.0-orange) ![](https://img.shields.io/badge/SDK-21+-brightgreen) ![](https://img.shields.io/badge/Android_Weekly-Issue_584-yellow)
<br /><br />
JsonTree is an Android library to display JSON data in Compose with syntax highlighting and more.
JsonTree is a Compose Multiplatform library to display JSON data in Compose with syntax highlighting and more.
<br /><br />

<p float="left">
<img src="screenshots/jsonTree.png" height="450">
<img src="screenshots/jsonTree-android-dark.png" height="450">
<img src="screenshots/jsonTreeGif.gif" height="450">
</p>
<img src="screenshots/jsonTree-macos.png" height="450">


## About

JsonTree is an Android library to display formatted JSON data in Compose.
JsonTree is an Compose Multiplatform library to display formatted JSON data in Compose.
Users can expand/collapse objects and arrays, which can also display additional info like item counts and item indices for arrays.
JsonTree offers several customizations for visual appearance like syntax highlighting, text style and icons.

## Download

See `maven-central` tag at the top for the latest version.

```groovy
```kotlin
dependencies {
implementation 'com.sebastianneubauer.jsontree:jsontree:latest-version'
// add this to commonMain in a multiplatform project
implementation("com.sebastianneubauer.jsontree:jsontree:latest-version")
}
```

Expand Down Expand Up @@ -65,7 +68,7 @@ JsonTree(
// The size of the arrow icon
iconSize = 20.dp,
// The TextStyle to use for the json tree
textStyle = TextStyle(...),
textStyle = TextStyle(/*...*/),
// If true, then array items will show their index.
showIndices = false,
// If true, then arrays and objects will show the amount of child items when collapsed.
Expand All @@ -74,7 +77,7 @@ JsonTree(
// until there are none or multiple on a level.
expandSingleChildren = false,
// A callback method which is called when the provided json data can't be parsed.
onError = { throwable -> /* Do something */ }
onError = { throwable: Throwable -> /* Do something */ }
)
```

Expand Down
1 change: 0 additions & 1 deletion app/.gitignore

This file was deleted.

69 changes: 0 additions & 69 deletions app/build.gradle

This file was deleted.

21 changes: 0 additions & 21 deletions app/proguard-rules.pro

This file was deleted.

208 changes: 0 additions & 208 deletions app/src/main/java/com/sebastianneubauer/jsontreedemo/MainActivity.kt

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions app/src/main/res/values/colors.xml

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/main/res/values/strings.xml

This file was deleted.

Loading