Skip to content

Commit 93ecceb

Browse files
Merge pull request #89 from ShreyashKore/multiplatform
migrate to KMP
2 parents f589c7a + 88d5a43 commit 93ecceb

File tree

85 files changed

+1868
-1135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1868
-1135
lines changed

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/iosApp.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
# 🌳 JsonTree
22

3-
![](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)
3+
![](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)
44
<br /><br />
5-
JsonTree is an Android library to display JSON data in Compose with syntax highlighting and more.
5+
JsonTree is a Compose Multiplatform library to display JSON data in Compose with syntax highlighting and more.
66
<br /><br />
77

88
<p float="left">
9-
<img src="screenshots/jsonTree.png" height="450">
9+
<img src="screenshots/jsonTree-android-dark.png" height="450">
1010
<img src="screenshots/jsonTreeGif.gif" height="450">
1111
</p>
12+
<img src="screenshots/jsonTree-macos.png" height="450">
13+
1214

1315
## About
1416

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

1921
## Download
2022

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

23-
```groovy
25+
```kotlin
2426
dependencies {
25-
implementation 'com.sebastianneubauer.jsontree:jsontree:latest-version'
27+
// add this to commonMain in a multiplatform project
28+
implementation("com.sebastianneubauer.jsontree:jsontree:latest-version")
2629
}
2730
```
2831

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

app/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/build.gradle

Lines changed: 0 additions & 69 deletions
This file was deleted.

app/proguard-rules.pro

Lines changed: 0 additions & 21 deletions
This file was deleted.

app/src/main/java/com/sebastianneubauer/jsontreedemo/MainActivity.kt

Lines changed: 0 additions & 208 deletions
This file was deleted.
-1.37 KB
Binary file not shown.
-2.83 KB
Binary file not shown.
-982 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)