Monday, October 26, 2020


I know nothing about EMF,  or emf-json, but it seems to me that you need to do it this way:

(using emfjson-gwt)

On Friday, October 23, 2020 at 7:10:31 AM UTC-6 wrote:
Hi all,
I am using GWT with EMF and I want write files on client side containing description of some EMF object with the JSON format. For this purpose I use EMFJson tool  ( with the following code but I can't write the file,. Have you an idea?

Here is the code:

        // As of here we preparing to save the model content
        ResourceSet resSet = new ResourceSetImpl();
        // Register the XMI resource factory for the * extension

        .put("*", new JsonResourceFactory());

        // Obtain a new resource set
        resSet.getURIConverter().getURIHandlers().add(new LocalStorageHandler());

        // create a resource
        URI uri = URI.createURI("file:///" + "D:/Spottest.json");
        Resource resource = resSet.createResource(uri);
        // Get the first model element and cast it to the right type,
        // everything is hierarchical included in this first node

        // now save the content.
        try {
        } catch (Exception e) {
            GWT.log("Pb saved " + e.getMessage());

Thanks a lot for your help.


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment