
com.codacy.client.stash.util.JsonEnumeration.scala Maven / Gradle / Ivy
package com.codacy.client.stash.util
import play.api.libs.json.Format
trait JsonEnumeration extends Enumeration {
self: Enumeration =>
implicit lazy val format = Format(Implicits.enumReads(self), Implicits.enumWrites)
def findByName(name: String): Option[Value] = {
values.find(v => name.equalsIgnoreCase(v.toString))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy