Loading ...
Sorry, an error occurred while loading the content.

StringWriter Class does not exist in J2ME but is used in mobile version of JSON

Expand Messages
  • Himanshu Ranavat
    Hi, Douglas Crockford asked me to report the problem on this yahoo group. I am using CLDC 1.1 and MIDP 2.1. If the json.me package was meant to support this
    Message 1 of 6 , Feb 25, 2008
    • 0 Attachment
      Hi,

      Douglas Crockford asked me to report the problem on this yahoo group.

      I am using CLDC 1.1 and MIDP 2.1. If the json.me package was meant to support this platform, then it will not. Since the class JSONStringer uses java.io.StringWriter which does not exist in any of the above platforms. The good part is that JSONStringer is not used by other classes in the same package and hence can be excluded and the JSON functionality can still be used.

      If the package targets CDC devices, then maybe StringWriter exists but I cannot confirm that. A google on CDC platforms can give some answer.

      Thanks
      Himanshu


      ---------------------------------
      Looking for last minute shopping deals? Find them fast with Yahoo! Search.

      [Non-text portions of this message have been removed]
    • Himanshu Ranavat
      It will work in CDC - Personal Profile http://java.sun.com/javame/reference/apis/jsr216/ Maybe its better, if we use a ported version of this class so it can
      Message 2 of 6 , Feb 25, 2008
      • 0 Attachment
        It will work in CDC - Personal Profile

        http://java.sun.com/javame/reference/apis/jsr216/

        Maybe its better, if we use a ported version of this class so it can work across all J2ME platforms. Also, if this class is ported (java.io.StringWriter), please do not give it a name containing "java..." otherwise users will need to do obfuscation.

        Himanshu

        Himanshu Ranavat <himanshu_ranavat@...> wrote: Hi,

        Douglas Crockford asked me to report the problem on this yahoo group.

        I am using CLDC 1.1 and MIDP 2.1. If the json.me package was meant to support this platform, then it will not. Since the class JSONStringer uses java.io.StringWriter which does not exist in any of the above platforms. The good part is that JSONStringer is not used by other classes in the same package and hence can be excluded and the JSON functionality can still be used.

        If the package targets CDC devices, then maybe StringWriter exists but I cannot confirm that. A google on CDC platforms can give some answer.

        Thanks
        Himanshu

        ---------------------------------
        Looking for last minute shopping deals? Find them fast with Yahoo! Search.

        [Non-text portions of this message have been removed]






        ---------------------------------
        Never miss a thing. Make Yahoo your homepage.

        [Non-text portions of this message have been removed]
      • Akhil Arora
        Hi Himanshu, An update of the org.json.me library hosted at https://meapplicationdevelopers.dev.java.net/mobileajax.html worked around this issue by supplying
        Message 3 of 6 , Feb 26, 2008
        • 0 Attachment
          Hi Himanshu,

          An update of the org.json.me library hosted at
          https://meapplicationdevelopers.dev.java.net/mobileajax.html worked
          around this issue by supplying its own minimal implementation of
          StringWriter in the org.json.me package itself. This library has been
          tested extensively on several CLDC/MIDP devices, including some very
          low-end ones, so it should work with all current devices (although I
          suspect most of the usage on devices has been on consuming json rather
          than producing it).

          Since the zipfile hosted at json.org is now known to have this bug, we
          can either

          1. update the zipfile with the latest source from the
          meapplicationdevelopers project, or

          2. replace the zipfile with a link to the meapplicationdevelopers
          project (which does not provide zips, in order to accommodate a large
          variety of devices with varying capabilities)

          I can supply the updated zip, please let me know.

          Thanks

          On 02/25/2008 09:54 PM, Himanshu Ranavat wrote:
          > Hi,
          >
          > Douglas Crockford asked me to report the problem on this yahoo group.
          >
          > I am using CLDC 1.1 and MIDP 2.1. If the json.me package was meant to support this platform, then it will not. Since the class JSONStringer uses java.io.StringWriter which does not exist in any of the above platforms. The good part is that JSONStringer is not used by other classes in the same package and hence can be excluded and the JSON functionality can still be used.
          >
          > If the package targets CDC devices, then maybe StringWriter exists but I cannot confirm that. A google on CDC platforms can give some answer.
          >
          > Thanks
          > Himanshu
          >
          >
          > ---------------------------------
          > Looking for last minute shopping deals? Find them fast with Yahoo! Search.
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
        • Himanshu Ranavat
          Hi, I do not have access to the ability to upload or make changes to json.org website. However, my personal suggestion would be to take an updated zip file
          Message 4 of 6 , Feb 27, 2008
          • 0 Attachment
            Hi,

            I do not have access to the ability to upload or make changes to json.org website. However, my personal suggestion would be to take an updated zip file from Akhil and upload it to the website. In addition to that there can also be a link to the project they are developing. I would leave this decision to those who have control over what goes on json.org website

            Thanks Akhil

            Himanshu

            Akhil Arora <akhil@...> wrote: Hi Himanshu,

            An update of the org.json.me library hosted at
            https://meapplicationdevelopers.dev.java.net/mobileajax.html worked
            around this issue by supplying its own minimal implementation of
            StringWriter in the org.json.me package itself. This library has been
            tested extensively on several CLDC/MIDP devices, including some very
            low-end ones, so it should work with all current devices (although I
            suspect most of the usage on devices has been on consuming json rather
            than producing it).

            Since the zipfile hosted at json.org is now known to have this bug, we
            can either

            1. update the zipfile with the latest source from the
            meapplicationdevelopers project, or

            2. replace the zipfile with a link to the meapplicationdevelopers
            project (which does not provide zips, in order to accommodate a large
            variety of devices with varying capabilities)

            I can supply the updated zip, please let me know.

            Thanks

            On 02/25/2008 09:54 PM, Himanshu Ranavat wrote:
            > Hi,
            >
            > Douglas Crockford asked me to report the problem on this yahoo group.
            >
            > I am using CLDC 1.1 and MIDP 2.1. If the json.me package was meant to support this platform, then it will not. Since the class JSONStringer uses java.io.StringWriter which does not exist in any of the above platforms. The good part is that JSONStringer is not used by other classes in the same package and hence can be excluded and the JSON functionality can still be used.
            >
            > If the package targets CDC devices, then maybe StringWriter exists but I cannot confirm that. A google on CDC platforms can give some answer.
            >
            > Thanks
            > Himanshu
            >
            >
            > ---------------------------------
            > Looking for last minute shopping deals? Find them fast with Yahoo! Search.
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >






            ---------------------------------
            Looking for last minute shopping deals? Find them fast with Yahoo! Search.

            [Non-text portions of this message have been removed]
          • Douglas Crockford
            ... json.org website. ... on json.org website Send me a file of good stuff and I will put it on JSON.org.
            Message 5 of 6 , Feb 28, 2008
            • 0 Attachment
              > I do not have access to the ability to upload or make changes to
              json.org website.

              > I would leave this decision to those who have control over what goes
              on json.org website

              Send me a file of good stuff and I will put it on JSON.org.
            • Himanshu Ranavat
              Okay, let see if I can come up with something Himanshu Douglas Crockford wrote: I do not have access to
              Message 6 of 6 , Feb 28, 2008
              • 0 Attachment
                Okay, let see if I can come up with something

                Himanshu

                Douglas Crockford <douglas@...> wrote: > I do not have access to the ability to upload or make changes to
                json.org website.

                > I would leave this decision to those who have control over what goes
                on json.org website

                Send me a file of good stuff and I will put it on JSON.org.






                ---------------------------------
                Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.