Bug 327385

Summary: [Browser] Add JSON notation support to BrowserFunction as map
Product: [Eclipse Project] Platform Reporter: Christopher Deckers <chrriis>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Modified 307 snippet to send JSON object.
none
Better sample showing JSON expected behavior none

Description Christopher Deckers CLA 2010-10-09 06:10:00 EDT
Build Identifier: SWT 3.7

Simple types can be exchanged (converted) between JS and Java. Currently, JSON notation is not supported: only the values are returned, we don't know what the keys are.

This was reported by a user who has legacy Flash components that expect certain methods. BrowserFunctions do not work.
JSON is pretty standard, so maybe this support could be added in the form of a Map.

Reproducible: Always

Steps to Reproduce:
See attached snippet.
Comment 1 Christopher Deckers CLA 2010-10-09 06:10:41 EDT
Created attachment 180544 [details]
Modified 307 snippet to send JSON object.
Comment 2 Christopher Deckers CLA 2010-10-09 07:14:03 EDT
(In reply to comment #0)

> Currently, JSON
> notation is not supported: only the values are returned, we don't know what the
> keys are.

I got confused and I was wrong when I stated that: null is returned, not even the values.
Comment 3 Christopher Deckers CLA 2010-10-10 13:27:32 EDT
Created attachment 180565 [details]
Better sample showing JSON expected behavior

This example has JS returning a JSON object with key/value pairs, and Java returning a map. The JS parsing of the result from Java was adapted and now expects the map that is returned.
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:14:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.