bug fixes related to create a new resouce with REST using an Array in the json input.
fixed a bug in REST in create new resource with Array. Some refactoring. Fixes on REST test.
Merge pull request #15 from ardadouk/master

merging