composer/composer — pull request #228 by jakzal (2012-01-19 00:07:35+00:00)
Title: Fixed json encoding when quoted value contains trailing backslash.

Should fix #227

Condition checking if current character is inside a quoted string did not consider the case when backslash before quote is escaped with another backslash.

For example array:

array('autoload' => array('psr-0' => 'Metadata\\' => 'src/'))

was encoded as:

"autoload": {
"psr-0": {
"Metadata\\":"src\/"}}

instead of:

"autoload": {
"psr-0": {
"Metadata\\":"src\/"
}
}