Bug 327385 - [Browser] Add JSON notation support to BrowserFunction as map
Summary: [Browser] Add JSON notation support to BrowserFunction as map
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-09 06:10 EDT by Christopher Deckers CLA
Modified: 2019-09-06 16:14 EDT (History)
0 users

See Also:


Attachments
Modified 307 snippet to send JSON object. (3.99 KB, text/java)
2010-10-09 06:10 EDT, Christopher Deckers CLA
no flags Details
Better sample showing JSON expected behavior (4.19 KB, text/java)
2010-10-10 13:27 EDT, Christopher Deckers CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.