Project

json_kit

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Toolkit for working with Json
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

JsonKit

Build Status Maintainability Test Coverage Gem Version

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

Installation

Add this line to your application's Gemfile:

gem 'json_kit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install json_kit

Usage

#JsonKit::Helper

This is class contains helper methods for working with json.

#to_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)

#from_json

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

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)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sage/json_kit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

This gem is available as open source under the terms of the MIT licence.

Copyright (c) 2018 Sage Group Plc. All rights reserved.