Popularity
7.8
Declining
Activity
0.0
Declining
30
5
8
Monthly Downloads: 1
Programming language: Haskell
License: MIT License
Tags:
Data
Latest version: v0.2.0
ruby-marshal alternatives and similar packages
Based on the "Data" category.
Alternatively, view ruby-marshal alternatives based on common mentions on social networks and blogs.
-
semantic-source
Parsing, analyzing, and comparing source code across many languages -
lens
Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens -
code-builder
Packages for defining APIs, running them, generating client code and documentation. -
text
Haskell library for space- and time-efficient operations over Unicode text. -
cassava
A CSV parsing and encoding library optimized for ease of use and high performance -
compendium-client
Mu (μ) is a purely functional framework for building micro services. -
unordered-containers
Efficient hashing-based container types -
holmes
A reference library for constraint-solving with propagators and CDCL. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
primitive
This package provides various primitive memory-related operations. -
json-autotype
Automatic Haskell type inference from JSON input -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
audiovisual
Extensible records, variants, structs, effects, tangles -
dependent-map
Dependently-typed finite maps (partial dependent products) -
IORefCAS
A collection of different packages for CAS based data structures. -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
safecopy
An extension to Data.Serialize with built-in version control -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
protobuf
An implementation of Google's Protocol Buffers in Haskell. -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation -
uuid-types
A Haskell library for creating, printing and parsing UUIDs -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
Learn any GitHub repo in 59 seconds
Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Promo
getonboard.dev
Do you think we are missing an alternative of ruby-marshal or a related project?
README
ruby-marshal
Haskell library to parse a subset of Ruby objects serialised with Marshal.dump.
Supported Types
NilClass
TrueClass | FalseClass
Array
Fixnum
Float
Hash
String
Symbol
If you would like to add support for another type, please feel free to create an issue or open a pull request using the guidelines below.
Usage
Example
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Ruby.Marshal
import Data.ByteString (ByteString)
import System.Directory (getCurrentDirectory)
import qualified Data.ByteString as BS
import qualified Data.Map.Strict as DM
lookupUserID :: (ByteString, RubyStringEncoding)
-> RubyObject
-> Maybe (ByteString, RubyStringEncoding)
lookupUserID key hash = fromRuby hash >>= \cookie -> DM.lookup key cookie
main :: IO ()
main = do
dir <- getCurrentDirectory
rbs <- BS.readFile (mconcat [dir, "/test/bin/railsCookie.bin"])
print $
case decode rbs of
Just cookie -> lookupUserID ("user_id", UTF_8) cookie
Nothing -> Nothing
Contributing
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin my-new-feature
). - Create new Pull Request.