Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Deprecate scala.util.parsing.json #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shared/src/main/scala/scala/util/parsing/json/JSON.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ package util.parsing.json
*
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
object JSON extends Parser {

/**
Expand Down
1 change: 1 addition & 0 deletions shared/src/main/scala/scala/util/parsing/json/Lexer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import scala.util.parsing.input.CharArrayReader.EofCh
/**
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
class Lexer extends StdLexical with ImplicitConversions {

override def token: Parser[Token] =
Expand Down
5 changes: 5 additions & 0 deletions shared/src/main/scala/scala/util/parsing/json/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import scala.util.parsing.combinator.syntactical._
*
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
sealed abstract class JSONType {
/**
* This version of toString allows you to provide your own value
Expand All @@ -40,6 +41,7 @@ sealed abstract class JSONType {
*
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
object JSONFormat {
/**
* This type defines a function that can be used to
Expand Down Expand Up @@ -91,6 +93,7 @@ object JSONFormat {
*
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
case class JSONObject (obj : Map[String,Any]) extends JSONType {
def toString (formatter : JSONFormat.ValueFormatter) =
"{" + obj.map({ case (k,v) => formatter(k.toString) + " : " + formatter(v) }).mkString(", ") + "}"
Expand All @@ -100,6 +103,7 @@ case class JSONObject (obj : Map[String,Any]) extends JSONType {
* Represents a JSON Array (list).
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
case class JSONArray (list : List[Any]) extends JSONType {
def toString (formatter : JSONFormat.ValueFormatter) =
"[" + list.map(formatter).mkString(", ") + "]"
Expand All @@ -110,6 +114,7 @@ case class JSONArray (list : List[Any]) extends JSONType {
*
* @author Derek Chen-Becker <"java"+@+"chen-becker"+"."+"org">
*/
@deprecated("Use The Scala Library Index to find alternatives: https://index.scala-lang.org/", "1.0.6")
class Parser extends StdTokenParsers with ImplicitConversions {
// Fill in abstract defs
type Tokens = Lexer
Expand Down
8 changes: 8 additions & 0 deletions shared/src/main/scala/scala/util/parsing/json/package.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package scala.util.parsing

/**
* This package was never intended for production use; it's really more of a code sample demonstrating how to use parser combinators.
*
* Use [[https://index.scala-lang.org/ The Scala Library Index]] to find alternative JSON parsing libraries.
*/
package object json {}