Exemplo n.º 1
0
 def test_ion_sexp(self):
     """Check that Ion `sexp` types convert to JSON `array`
     """
     ion_cursor = ion.loads(_ION_SEXPS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_SEXPS)
Exemplo n.º 2
0
def parse_result(cursor):
    return ion_cursor_to_json(cursor)
Exemplo n.º 3
0
 def test_ion_clob(self):
     """Check that Ion `clob` types convert to JSON `string`
     """
     ion_cursor = ion.loads(_ION_CLOBS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_CLOBS)
Exemplo n.º 4
0
 def test_ion_struct(self):
     """Check that Ion `struct` types convert to JSON `object`
     """
     ion_cursor = ion.loads(_ION_STRUCTS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_STRUCTS)
Exemplo n.º 5
0
 def test_ion_symbol(self):
     """Check that Ion `symbol` types convert to JSON `string`
     """
     ion_cursor = ion.loads(_ION_SYMBOLS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_SYMBOLS)
Exemplo n.º 6
0
 def test_ion_timestamp(self):
     """Check that Ion `timestamp` types convert to JSON `string`
     """
     ion_cursor = ion.loads(_ION_TIMESTAMPS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_TIMESTAMPS)
Exemplo n.º 7
0
 def test_ion_decimal(self):
     """Check that Ion `decimal` types convert to JSON `number`
     """
     ion_cursor = ion.loads(_ION_DECIMALS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_DECIMALS)
Exemplo n.º 8
0
 def test_ion_int(self):
     """Check that Ion `int` types convert to JSON `number`
     """
     ion_cursor = ion.loads(_ION_INTS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_INTS)
Exemplo n.º 9
0
 def test_ion_bool(self):
     """Check that Ion `bool` types convert to JSON `bool`
     """
     ion_cursor = ion.loads(_ION_BOOLS)
     json_rows = ion_cursor_to_json(ion_cursor)
     self.assertEqual(json.dumps(json_rows), _JSON_BOOLS)