trait AngularJSONStringOps extends JSONStringOps
JSON String operations for Angular application's server side.
- camelCase keys - JSON vulnerability protection enabled by default
- Alphabetic
- By Inheritance
- AngularJSONStringOps
- JSONStringOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJValue[T](obj: T)(implicit writer: Writer[T]): JValue
- Definition Classes
- JSONStringOps
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compact(value: JValue): String
Returns JSON string value.
-
def
defaultObjectMapper: ObjectMapper
- Definition Classes
- JSONStringOps
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromJSONString[A](json: String, underscoreKeys: Boolean = false, asIs: Boolean = false)(implicit mf: Manifest[A]): Try[A]
Extracts a value from JSON string.
Extracts a value from JSON string. NOTE: When you convert to Map objects, be aware that underscoreKeys is false by default.
- A
return type
- json
json string
- underscoreKeys
apply #underscoreKeys keys if true
- asIs
never apply key conversions if true
- returns
value
- Definition Classes
- JSONStringOps
-
def
fromJSONStringAsIs[A](json: String)(implicit mf: Manifest[A]): Try[A]
Extracts a value from JSON string.
Extracts a value from JSON string. The keys will be used as-is.
case class Something(fooBar_baz: String) val something = new Something("foo") val json = toJSONString(something) val something2 = fromJSONStringAsIs[Something](json) something2.map(_.fooBar_baz) should equal(Some(something.fooBar_Baz))
- A
return type
- json
json string
- mf
manifest
- returns
value
- Definition Classes
- JSONStringOps
-
def
fromJSONStringToJValue(json: String, underscoreKeys: Boolean = false, asIs: Boolean = false): Try[JValue]
Extracts a JSON value from JSON string.
Extracts a JSON value from JSON string. NOTE: When you convert to Map objects, be aware that underscoreKeys is false by default.
- json
json string
- underscoreKeys
underscore keys
- returns
value
- Definition Classes
- JSONStringOps
-
def
fromJValue[T](json: JValue)(implicit reader: Reader[T]): T
- Definition Classes
- JSONStringOps
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
val
jsonFormats: Formats
JSON format support implicitly.
JSON format support implicitly.
- Attributes
- protected
- Definition Classes
- JSONStringOps
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
prefixForJSONVulnerabilityProtection: String
the prefix for JSON Vulnerability Protection.
the prefix for JSON Vulnerability Protection. see: "https://docs.angularjs.org/api/ng/service/$http"
- Attributes
- protected
- Definition Classes
- JSONStringOps
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toJSON(v: Any): JValue
Converts a value to JSON value.
-
def
toJSONString(v: Any, underscoreKeys: Boolean = useUnderscoreKeysForJSON): String
Converts a value to JSON string.
Converts a value to JSON string.
- v
value
- underscoreKeys
apply #underscoreKeys keys if true
- returns
json string
- Definition Classes
- JSONStringOps
-
def
toJSONStringAsIs(v: Any): String
Converts a value to JSON string without key conversions.
Converts a value to JSON string without key conversions.
- v
value
- returns
json string
- Definition Classes
- JSONStringOps
-
def
toPrettyJSONString(v: Any, underscoreKeys: Boolean = useUnderscoreKeysForJSON): String
Converts a value to prettified JSON string.
Converts a value to prettified JSON string.
- v
value
- underscoreKeys
apply #underscoreKeys keys if true
- returns
json string
- Definition Classes
- JSONStringOps
-
def
toPrettyJSONStringAsIs(v: Any): String
Converts a value to prettified JSON string without key conversions.
Converts a value to prettified JSON string without key conversions.
- v
value
- returns
json string
- Definition Classes
- JSONStringOps
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
useJSONVulnerabilityProtection: Boolean
Use the prefix for JSON Vulnerability Protection.
Use the prefix for JSON Vulnerability Protection. see: "https://docs.angularjs.org/api/ng/service/$http"
- Attributes
- protected
- Definition Classes
- AngularJSONStringOps → JSONStringOps
-
def
useUnderscoreKeysForJSON: Boolean
Default key policy.
Default key policy.
- Attributes
- protected
- Definition Classes
- AngularJSONStringOps → JSONStringOps
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )