What to use in the face of deprecation of the scala.util.parsing.json._ package?












9















How to solve Scala Problem?
I have warning by JSON usage in my project:




Object JSON in package json is depricated. This object will be
removed.




import scala.util.parsing.json._
JSON.parseRaw("[{'a':'b'},{'c':'d'}]")









share|improve this question





























    9















    How to solve Scala Problem?
    I have warning by JSON usage in my project:




    Object JSON in package json is depricated. This object will be
    removed.




    import scala.util.parsing.json._
    JSON.parseRaw("[{'a':'b'},{'c':'d'}]")









    share|improve this question



























      9












      9








      9


      1






      How to solve Scala Problem?
      I have warning by JSON usage in my project:




      Object JSON in package json is depricated. This object will be
      removed.




      import scala.util.parsing.json._
      JSON.parseRaw("[{'a':'b'},{'c':'d'}]")









      share|improve this question
















      How to solve Scala Problem?
      I have warning by JSON usage in my project:




      Object JSON in package json is depricated. This object will be
      removed.




      import scala.util.parsing.json._
      JSON.parseRaw("[{'a':'b'},{'c':'d'}]")






      json scala






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 10 '15 at 22:15









      toniedzwiedz

      13k85697




      13k85697










      asked Apr 25 '15 at 16:08









      BeachBirdBeachBird

      5612




      5612
























          4 Answers
          4






          active

          oldest

          votes


















          11














          Usually, this means a piece of functionality has been superseded by another implementation the use of which is preferred over the old one and a question like this simply means the OP is too lazy to google the docs. This is especially true in case of libraries in the Java language, which treats backward compatibility very seriously (to the point it becomes a pain for some). The Scala ecosystem is not so strict in this regard and upgrading to a newer version of the language means you can get a different API or even binary incompabilities. See also Scala: binary incompatibility between releases. This is not a comment against Scala. There are good reasons these incompatibilities exist.



          However, I must admit that the documentation for scala.util.parsing.json does not contain any information regarding the recommended replacement for this functionality whatsoever. It took me quite a while to dig up something that just barely resembles a clear statement of what the recommended replacement is.



          There seems to have been a lot of discussion in the community about the point and repercussions of this deprecation. I recommend reading this thread in the scala-users group if you're interested.



          The most quoted reasons for this deprecation seem to be around poor performance and thread safety.



          The deprecation was done as part of this Jira issue and the use of different parsers is recommended in the closing comment of this related task that was not completed due to the deprecation.



          Alternatives include:




          • play-json

          • spray-json

          • argonaut

          • jackson


          • rapture-json (which allows you to choose between different implementations)


          To answer your question. This is a warning, your code should not break until this object is actually removed. However, if new bugs are found in this functionality, they most likely aren't going to be fixed. Your code can also break if you upgrade to a newer version of Scala that actually has those packages removed (Version 2.11.0 and above, according to the documentation)






          share|improve this answer

































            2














            The answer previously provided by @toniedzwiedz is very complete and describe the whole story around the question.
            I just had the same issue using Scala 2.11 and I solved adding the dependencies which are in this repository.
            In particular, for Scala 2.11 is:



            <dependency>
            <groupId>org.scala-lang.modules</groupId>
            <artifactId>scala-parser-combinators_2.11</artifactId>
            <version>1.1.0</version>
            </dependency>


            Then you will not have the warning.






            share|improve this answer































              0














              Also considere using Lift JSON as an alternative



              https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/






              share|improve this answer































                -2














                The JSON parser in the Scala standard library is deprecated. You should pick one of more robust third-party libraries like Jackson, Play-Json, json4s, etc.






                share|improve this answer























                  Your Answer






                  StackExchange.ifUsing("editor", function () {
                  StackExchange.using("externalEditor", function () {
                  StackExchange.using("snippets", function () {
                  StackExchange.snippets.init();
                  });
                  });
                  }, "code-snippets");

                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "1"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29867579%2fwhat-to-use-in-the-face-of-deprecation-of-the-scala-util-parsing-json-package%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  11














                  Usually, this means a piece of functionality has been superseded by another implementation the use of which is preferred over the old one and a question like this simply means the OP is too lazy to google the docs. This is especially true in case of libraries in the Java language, which treats backward compatibility very seriously (to the point it becomes a pain for some). The Scala ecosystem is not so strict in this regard and upgrading to a newer version of the language means you can get a different API or even binary incompabilities. See also Scala: binary incompatibility between releases. This is not a comment against Scala. There are good reasons these incompatibilities exist.



                  However, I must admit that the documentation for scala.util.parsing.json does not contain any information regarding the recommended replacement for this functionality whatsoever. It took me quite a while to dig up something that just barely resembles a clear statement of what the recommended replacement is.



                  There seems to have been a lot of discussion in the community about the point and repercussions of this deprecation. I recommend reading this thread in the scala-users group if you're interested.



                  The most quoted reasons for this deprecation seem to be around poor performance and thread safety.



                  The deprecation was done as part of this Jira issue and the use of different parsers is recommended in the closing comment of this related task that was not completed due to the deprecation.



                  Alternatives include:




                  • play-json

                  • spray-json

                  • argonaut

                  • jackson


                  • rapture-json (which allows you to choose between different implementations)


                  To answer your question. This is a warning, your code should not break until this object is actually removed. However, if new bugs are found in this functionality, they most likely aren't going to be fixed. Your code can also break if you upgrade to a newer version of Scala that actually has those packages removed (Version 2.11.0 and above, according to the documentation)






                  share|improve this answer






























                    11














                    Usually, this means a piece of functionality has been superseded by another implementation the use of which is preferred over the old one and a question like this simply means the OP is too lazy to google the docs. This is especially true in case of libraries in the Java language, which treats backward compatibility very seriously (to the point it becomes a pain for some). The Scala ecosystem is not so strict in this regard and upgrading to a newer version of the language means you can get a different API or even binary incompabilities. See also Scala: binary incompatibility between releases. This is not a comment against Scala. There are good reasons these incompatibilities exist.



                    However, I must admit that the documentation for scala.util.parsing.json does not contain any information regarding the recommended replacement for this functionality whatsoever. It took me quite a while to dig up something that just barely resembles a clear statement of what the recommended replacement is.



                    There seems to have been a lot of discussion in the community about the point and repercussions of this deprecation. I recommend reading this thread in the scala-users group if you're interested.



                    The most quoted reasons for this deprecation seem to be around poor performance and thread safety.



                    The deprecation was done as part of this Jira issue and the use of different parsers is recommended in the closing comment of this related task that was not completed due to the deprecation.



                    Alternatives include:




                    • play-json

                    • spray-json

                    • argonaut

                    • jackson


                    • rapture-json (which allows you to choose between different implementations)


                    To answer your question. This is a warning, your code should not break until this object is actually removed. However, if new bugs are found in this functionality, they most likely aren't going to be fixed. Your code can also break if you upgrade to a newer version of Scala that actually has those packages removed (Version 2.11.0 and above, according to the documentation)






                    share|improve this answer




























                      11












                      11








                      11







                      Usually, this means a piece of functionality has been superseded by another implementation the use of which is preferred over the old one and a question like this simply means the OP is too lazy to google the docs. This is especially true in case of libraries in the Java language, which treats backward compatibility very seriously (to the point it becomes a pain for some). The Scala ecosystem is not so strict in this regard and upgrading to a newer version of the language means you can get a different API or even binary incompabilities. See also Scala: binary incompatibility between releases. This is not a comment against Scala. There are good reasons these incompatibilities exist.



                      However, I must admit that the documentation for scala.util.parsing.json does not contain any information regarding the recommended replacement for this functionality whatsoever. It took me quite a while to dig up something that just barely resembles a clear statement of what the recommended replacement is.



                      There seems to have been a lot of discussion in the community about the point and repercussions of this deprecation. I recommend reading this thread in the scala-users group if you're interested.



                      The most quoted reasons for this deprecation seem to be around poor performance and thread safety.



                      The deprecation was done as part of this Jira issue and the use of different parsers is recommended in the closing comment of this related task that was not completed due to the deprecation.



                      Alternatives include:




                      • play-json

                      • spray-json

                      • argonaut

                      • jackson


                      • rapture-json (which allows you to choose between different implementations)


                      To answer your question. This is a warning, your code should not break until this object is actually removed. However, if new bugs are found in this functionality, they most likely aren't going to be fixed. Your code can also break if you upgrade to a newer version of Scala that actually has those packages removed (Version 2.11.0 and above, according to the documentation)






                      share|improve this answer















                      Usually, this means a piece of functionality has been superseded by another implementation the use of which is preferred over the old one and a question like this simply means the OP is too lazy to google the docs. This is especially true in case of libraries in the Java language, which treats backward compatibility very seriously (to the point it becomes a pain for some). The Scala ecosystem is not so strict in this regard and upgrading to a newer version of the language means you can get a different API or even binary incompabilities. See also Scala: binary incompatibility between releases. This is not a comment against Scala. There are good reasons these incompatibilities exist.



                      However, I must admit that the documentation for scala.util.parsing.json does not contain any information regarding the recommended replacement for this functionality whatsoever. It took me quite a while to dig up something that just barely resembles a clear statement of what the recommended replacement is.



                      There seems to have been a lot of discussion in the community about the point and repercussions of this deprecation. I recommend reading this thread in the scala-users group if you're interested.



                      The most quoted reasons for this deprecation seem to be around poor performance and thread safety.



                      The deprecation was done as part of this Jira issue and the use of different parsers is recommended in the closing comment of this related task that was not completed due to the deprecation.



                      Alternatives include:




                      • play-json

                      • spray-json

                      • argonaut

                      • jackson


                      • rapture-json (which allows you to choose between different implementations)


                      To answer your question. This is a warning, your code should not break until this object is actually removed. However, if new bugs are found in this functionality, they most likely aren't going to be fixed. Your code can also break if you upgrade to a newer version of Scala that actually has those packages removed (Version 2.11.0 and above, according to the documentation)







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited May 23 '17 at 12:18









                      Community

                      11




                      11










                      answered Apr 25 '15 at 16:40









                      toniedzwiedztoniedzwiedz

                      13k85697




                      13k85697

























                          2














                          The answer previously provided by @toniedzwiedz is very complete and describe the whole story around the question.
                          I just had the same issue using Scala 2.11 and I solved adding the dependencies which are in this repository.
                          In particular, for Scala 2.11 is:



                          <dependency>
                          <groupId>org.scala-lang.modules</groupId>
                          <artifactId>scala-parser-combinators_2.11</artifactId>
                          <version>1.1.0</version>
                          </dependency>


                          Then you will not have the warning.






                          share|improve this answer




























                            2














                            The answer previously provided by @toniedzwiedz is very complete and describe the whole story around the question.
                            I just had the same issue using Scala 2.11 and I solved adding the dependencies which are in this repository.
                            In particular, for Scala 2.11 is:



                            <dependency>
                            <groupId>org.scala-lang.modules</groupId>
                            <artifactId>scala-parser-combinators_2.11</artifactId>
                            <version>1.1.0</version>
                            </dependency>


                            Then you will not have the warning.






                            share|improve this answer


























                              2












                              2








                              2







                              The answer previously provided by @toniedzwiedz is very complete and describe the whole story around the question.
                              I just had the same issue using Scala 2.11 and I solved adding the dependencies which are in this repository.
                              In particular, for Scala 2.11 is:



                              <dependency>
                              <groupId>org.scala-lang.modules</groupId>
                              <artifactId>scala-parser-combinators_2.11</artifactId>
                              <version>1.1.0</version>
                              </dependency>


                              Then you will not have the warning.






                              share|improve this answer













                              The answer previously provided by @toniedzwiedz is very complete and describe the whole story around the question.
                              I just had the same issue using Scala 2.11 and I solved adding the dependencies which are in this repository.
                              In particular, for Scala 2.11 is:



                              <dependency>
                              <groupId>org.scala-lang.modules</groupId>
                              <artifactId>scala-parser-combinators_2.11</artifactId>
                              <version>1.1.0</version>
                              </dependency>


                              Then you will not have the warning.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered May 24 '18 at 21:17









                              dbustospdbustosp

                              1,310928




                              1,310928























                                  0














                                  Also considere using Lift JSON as an alternative



                                  https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/






                                  share|improve this answer




























                                    0














                                    Also considere using Lift JSON as an alternative



                                    https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      Also considere using Lift JSON as an alternative



                                      https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/






                                      share|improve this answer













                                      Also considere using Lift JSON as an alternative



                                      https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered May 1 '15 at 12:33









                                      Carlos SaltosCarlos Saltos

                                      15117




                                      15117























                                          -2














                                          The JSON parser in the Scala standard library is deprecated. You should pick one of more robust third-party libraries like Jackson, Play-Json, json4s, etc.






                                          share|improve this answer




























                                            -2














                                            The JSON parser in the Scala standard library is deprecated. You should pick one of more robust third-party libraries like Jackson, Play-Json, json4s, etc.






                                            share|improve this answer


























                                              -2












                                              -2








                                              -2







                                              The JSON parser in the Scala standard library is deprecated. You should pick one of more robust third-party libraries like Jackson, Play-Json, json4s, etc.






                                              share|improve this answer













                                              The JSON parser in the Scala standard library is deprecated. You should pick one of more robust third-party libraries like Jackson, Play-Json, json4s, etc.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Apr 25 '15 at 16:40









                                              RyanRyan

                                              6,59352139




                                              6,59352139






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29867579%2fwhat-to-use-in-the-face-of-deprecation-of-the-scala-util-parsing-json-package%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Create new schema in PostgreSQL using DBeaver

                                                  Deepest pit of an array with Javascript: test on Codility

                                                  Costa Masnaga