Library that unserializes PHP serialized strings (through PHPs serialize method.).
Supports basic values, array (also asociative) and PHP objects.
Add the following resolver to your build.sbt:
resolvers += Resolver.bintrayRepo("ceratech", "maven")Add the following dependency to your dependencies:
libraryDependencies += "io.ceratech" %% "php-unserializer" % "0.1"Call the unserialize method of the PHPSParser object. Like so:
PHPSParser.unserialize(inputString)The resulting value is an Any.
Parse results, given a certain input:
- A non-asociative array in the serialized data will be parsed into a Scala list
- A asociative array in the serialized data will be parsed into a Scala map
- PHPs nullwill be parsed into a ScalaNone
This project is a fork from Scala PHPS cleaning up some things and adding deployment for simplified usage.