New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

session_jsonizer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

session_jsonizer

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

rails-session_jsonizer

rails-session_jsonizer is a simple library for Rails 3 and 4 to serialize session into JSON in the same format.

Work in progress

Build Status

Requirement

  • Rails 3.1 or later

Usage

In controller

session[:foo] = 'bar'
flash[:alert] = 'something went wrong'

Serialize

require 'session_jsonizer'

# dump
serializer = SessionJsonizer.new

json = serializer.dump(session)

json # => '{"foo":"bar", "flash":{"alert":"something went wrong"}, ...}'

# load
session = serializer.load(json)

Example: Store session into memcached as JSON using dalli

# config/initializers/session_store.rb

require 'action_dispatch/middleware/session/dalli_store'
Rails.application.config.session_store :dalli_store, serializer: SessionJsonizer.new, ...

FAQs

Package last updated on 15 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc