Skip to content

Commit

Permalink
fix toInt error
Browse files Browse the repository at this point in the history
  • Loading branch information
aiceflower committed Jan 9, 2025
1 parent 5d7500e commit 15bfc3f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
package org.apache.linkis.storage.domain

import java.lang.reflect.Type

import com.google.gson.GsonBuilder
import com.google.gson.{GsonBuilder, ToNumberPolicy}

/**
* @param id
Expand Down Expand Up @@ -56,7 +55,10 @@ case class MethodEntity(

object MethodEntitySerializer {

val gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").create
val gson = new GsonBuilder()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
.setObjectToNumberStrategy(ToNumberPolicy.LAZILY_PARSED_NUMBER)
.create

/**
* Serialized to code as a MethodEntity object 序列化为code为MethodEntity对象
Expand Down

0 comments on commit 15bfc3f

Please sign in to comment.