converts a map to javascript object based on a schema @param map the map to convert @param schema the schema to use for conversion @param depth call depth used for debugging messages @return the resulting javascript object
(Map<String, Object> map, Schema schema, int depth)
| 284 | * @return the resulting javascript object |
| 285 | */ |
| 286 | private Scriptable pigMapToJS(Map<String, Object> map, Schema schema, int depth) { |
| 287 | debugConvertPigToJS(depth, "Map", map, schema); |
| 288 | Scriptable object = jsScriptEngine.jsNewObject(); |
| 289 | |
| 290 | for (Entry<String, Object> entry : map.entrySet()) { |
| 291 | object.put(entry.getKey(), object, entry.getValue()); |
| 292 | } |
| 293 | debugReturn(depth, object); |
| 294 | return object; |
| 295 | } |
| 296 | |
| 297 | /** |
| 298 | * converts a bag to javascript object based on a schema |
no test coverage detected