Fix test and add test for JSON reviver
Add support for reviver function