All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalapb.TextFormat.scala Maven / Gradle / Ivy

The newest version!
package scalapb

import scalapb.textformat.Printer
import scalapb.textformat.ProtoAsciiParsing

case class TextFormatError(msg: String)

class TextFormatException(msg: String) extends RuntimeException(msg)

object TextFormat extends ProtoAsciiParsing {
  def printToString(m: GeneratedMessage) = {
    Printer.printToString(m, singleLineMode = false, escapeNonAscii = true)
  }

  def printToUnicodeString(m: GeneratedMessage) = {
    Printer.printToString(m, singleLineMode = false, escapeNonAscii = false)
  }

  def printToSingleLineUnicodeString(m: GeneratedMessage) = {
    Printer.printToString(m, singleLineMode = true, escapeNonAscii = false)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy