Skip to content
tannevaledPublic

About

Ruby Simple Object's Notation

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

Ruby Simple Object's Notation

Build Status Gem Version Code Climate Test Coverage Issue Count

RSON convert a string representation of Ruby simple objects to Ruby objects. It does not use eval() but the parser gem to really parse strings.

Supported Types :

  • Integer
  • Float
  • Symbol
  • String (multi-line)
  • Nil
  • TrueClass
  • FalseClass
  • Array
  • Hash

Examples

Loading from a string

require 'rson'

buffer = %q({ a: 1, 2 => true, 'c' => :d })
Serializer::RSON.load(buffer:buffer) # => { a: 1, 2 => true, 'c' => :d }

Loading from a file

require 'rson'

Serializer::RSON.load(
  file_name:'config.rson',
  file_path:'/etc/some_application'
) # => { a: 1, 2 => true, 'c' => :d }

Installation

gem install rson

About

Ruby Simple Object's Notation

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages