Are there are any examples, tutorials or docs for serialization / pickling / marshalling objects in Scala? I know of existence of scala.util.Marshal and scala.reflect.internal.pickling, but what is a difference between them? how can I use it? Is that some experimetal feature or can I use it in production ... ?
serialization (pickling / marshalling) in scala?
1.7k Views Asked by ts. At
2
There are 2 best solutions below
1
Nabegh
On
Not sure about the requirements you have, but it's worth looking at Google's Protocol Buffers and Apache Thrift. Both provide efficient mechanism for serialization.
There is a Protocol Buffers scala compiler ScalaBuff
Related Questions in SCALA
- Spark .mapValues setup with multiple values
- Where do 'normal' println go in a scala jar, under Spark
- Serializing to disk and deserializing Scala objects using Pickling
- Where has "Show Type Info on Mouse Motion" gone in Intellij 14
- AbstractMethodError when mixing in trait nested in object - only when compiled and imported
- Scala POJO Aggregator Exception
- How to read in numbers from n lines into a Scala list?
- Spark pairRDD not working
- Scala Eclipse IDE compiler giving errors until "clean" is run
- How to port Slick 2.1 plain SQL queries to Slick 3.0
- Log of dependency does not show
- Getting unary error for escaped characters in Scala
- Akka actor invoked with a function delegate - is this bad practice?
- Json implicit format with recursive class definition
- How to create a executable jar reading files from local file system
Related Questions in SERIALIZATION
- Saving FileSystemInfo Array to File
- Serializing to disk and deserializing Scala objects using Pickling
- Serializing TypeInfo / Type across .Net Platforms
- How can I send multiple objects over one socket in java?
- Non-intruisive Boost serialization of labelled enums C++
- While Conditions for Deserializing Multiple Objects in Java
- Xml serializing and deserializing with memory stream
- How do I Serialize a JMS Message?
- Serializable class with ISerializable constructor
- Serializing a struct whose definition is not known
- XML Deserializing lists with objects only getting one level
- Using active model serializers for json and csv in Rails?
- Why does Java serialization take up so much space?
- Using Gson to serialize strings with \n in them
- How to covert JSON field name to a Java compatible property name while doing Jackson de-serialisation?
Related Questions in DOCUMENTATION
- How to manage and address supplementary data in R packages
- R functions' aliases documentation
- Document Restful API created in Node.JS
- JSDoc - How to document methods of a prototype object
- How to document an @IBInspectable property in Xcode
- Springfox/Swagger : Documenting HashMap object
- Modifying the grunt-ngDocs template
- Netbeans 8 auto add author to method comment
- How to properly write cross-references to external documentation with intersphinx?
- What is this error about perllocale in Perldoc?
- Human readable documentation current WebSphere configuration
- Error using local modules in documentation tests
- Which type of diagram is used for denoting Client / Server socket programming?
- PHP Docblock for child using parent constructor?
- include imported functions in module documentation
Related Questions in MARSHALLING
- Why doesn't wrapping a List/Map in a JAXBElement work?
- Marshalling C# from DLL to WPF form
- Call class member of c++ DLL from c#
- Reading binary file into struct
- Problems when P/Invoking CertCreateSelfSignCertificate
- XMLGregorianCalendar not displayed in the right format when marshalled
- Get object reference name in Java for constructing XML
- Byte array Marshalling
- .NET Interop: How to get returned string (not null terminated) from unmanaged DLL in C#
- reconstruct python method with kwargs with marshal and types?
- Marshall map to XML in Go
- Is dllexport needed in the source C dll to be able to be used in c# with [DllImport]?
- Marshal struct in struct from c# to c++
- How to correctly marshal .NET Strings to std::wstrings for native code?
- Calling C DLL function from C# - parameter struct too large or complex to marshal
Related Questions in SCALA-PICKLING
- Serializing to disk and deserializing Scala objects using Pickling
- Scala Pickling usage MyObject -> Array[Byte] -> MyObject
- Scala Pickling and type parameters
- Scala pickling: Simple custom pickler for my own class?
- Cannot pickle Array but can pickle List in Scala with Pickling
- Getting MissingRequirementError after moving classes to another package
- serialization (pickling / marshalling) in scala?
- Cannot Generate unpickler for case class with immutable HashMaps
- scala-pickling in POJO in scala 2.11 - Is it really simple?
- Scala Pickling: Some of the constructor parameters could not be serialized
- Scala pickling with JSON list
- I've got error for generating pickler/unpickler for a type with type-parameter
- Out of memory error during Scala compilation
- Scala unpickling from string
- Unpickle/convert pyspark RDD of Rows to Scala RDD[Row]
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You should use either java serialization (I recommend using the Externalizable approach for complex cases). You can find lots of tutorials by googling "java serialization tutorial".
If you want to stay in Scala, you should have a look to SBinary which uses composable type classes. The project seems old and unmaintained but works like a charm with Scala 2.9.2. There's a tutorial link in the README and I'm currently writing another one.