Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sudo: required
language: node_js
env:
- CXX="g++-4.8"

node_js:
- "0.8"
- "0.10"
- "0.12"
- "iojs"
- "iojs-v2"
- "iojs-v1"

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- gcc-4.8

before_install:
# npm shipped with Node.js 0.8 doesn't support carret so let's update it
- if [ "$TRAVIS_NODE_VERSION" == "0.8" ]; then npm install -g npm; fi
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Simple XML2JSON Parser
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/buglabs/node-xml2json?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/buglabs/node-xml2json.svg?branch=master)](https://travis-ci.org/buglabs/node-xml2json)

It does not parse the following elements:

Expand Down Expand Up @@ -41,7 +42,7 @@ Default values:
var options = {
object: false,
reversible: false,
coerce: true,
coerce: false,
sanitize: true,
trim: true,
arrayNotation: false
Expand Down
2 changes: 1 addition & 1 deletion lib/xml2json.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ module.exports = function(xml, _options) {
var schema = {
object: joi.boolean().default(false),
reversible: joi.boolean().default(false),
coerce: joi.alternatives([joi.boolean(), joi.object()]).default(true),
coerce: joi.alternatives([joi.boolean(), joi.object()]).default(false),
sanitize: joi.boolean().default(true),
trim: joi.boolean().default(true),
arrayNotation: joi.boolean().default(false)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xml2json",
"version": "0.8.1",
"version": "0.9.0",
"description": "Converts xml to json and vice-versa, using node-expat.",
"repository": "git://github.com/buglabs/node-xml2json.git",
"license": "MIT",
Expand Down