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

com.codacy.client.bitbucket.util.JsonEnumeration.scala Maven / Gradle / Ivy

The newest version!
package com.codacy.client.bitbucket.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(p => p.toString.toLowerCase == name.toLowerCase)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy