Skip to content

Commit

Permalink
Merge pull request #3 from Sage/badges
Browse files Browse the repository at this point in the history
Update badges
  • Loading branch information
chrisbarber86 authored Apr 6, 2018
2 parents 759bfd8 + f6b6f54 commit 4d8e919
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# JsonKit

[![Build Status](https://travis-ci.org/Sage/json_kit.svg?branch=master)](https://travis-ci.org/Sage/json_kit)
[![Maintainability](https://api.codeclimate.com/v1/badges/aceb2a238169f80ca614/maintainability)](https://codeclimate.com/github/Sage/json_kit/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/aceb2a238169f80ca614/test_coverage)](https://codeclimate.com/github/Sage/json_kit/test_coverage)
[![Gem Version](https://badge.fury.io/rb/json_kit.svg)](https://badge.fury.io/rb/json_kit)

Welcome to your JsonKit! JsonKit is a toolkit for working with json.

## Installation
Expand All @@ -12,11 +17,15 @@ gem 'json_kit'

And then execute:

$ bundle
```bash
$ bundle
```

Or install it yourself as:

$ gem install json_kit
```bash
$ gem install json_kit
```

## Usage

Expand All @@ -29,18 +38,22 @@ This is class contains helper methods for working with json.

This method is called to convert an object to a json string. (This can be a class instance or hash)

json = helper.to_json(obj)
```ruby
json = helper.to_json(obj)
```

## #from_json

This method is called to convert a json string to an ruby object.

hash = helper.from_json(json)
```ruby
hash = helper.from_json(json)

....
....

#json_kit uses hash_kit so supports specifying a class name and transforms to convert the json into a ruby class instance.
obj = helper.from_json(json, TestEntity, transforms)
#json_kit uses hash_kit so supports specifying a class name and transforms to convert the json into a ruby class instance.
obj = helper.from_json(json, TestEntity, transforms)
```

## Contributing

Expand Down

0 comments on commit 4d8e919

Please sign in to comment.