Giter VIP home page Giter VIP logo

jconfig's Introduction

License: Apache 2.0 Kotlin Maven Central

JConfig

JConfig is a simple library made to help with storing and retrieving data from a json file in Java and Kotlin.

Example

For example, say you are making a discord bot and you want to store the token in a json file, you can do this:

  1. create a config.json file in the root of your project. If you want you can change the files name, but I will shows you how to do it with the default name.
{
  "token": "YOUR_TOKEN_HERE"
}
  1. We know need to get the token, so we will use JConfigUtils which has a standard builder.
val token = JConfig.build()
   .get("token")
   .asText()

And thats it for getting the token.

Installation

Maven

<dependency>
    <groupId>io.github.realyusufismail</groupId>
    <artifactId>jconfig</artifactId>
    <version>1.1.1</version>
</dependency>

Gradle

//kotlin
dependencies {
   implementation("io.github.realyusufismail:jconfig:1.1.1")
}

//groovy
dependencies {
   implementation "io.github.realyusufismail:jconfig:1.1.1"
}

Documentation

See the wiki

Contributing

Just make a pr and wait for it to be reviewed.

jconfig's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar gradle-update-robot avatar realyusufismail avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.