implement ostream output/insertion of json_type
unit test and fix bug in expecting method for streamed array parsing