feat!: migrate from lift-json to json4s#2038
Conversation
not sure why my migration to json4s would have caused a failure here
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the Lift framework from its internal lift-json library to the external json4s library. This is a breaking change that updates all JSON-related imports and functionality across the codebase while removing the internal JSON implementation.
- Removes the entire internal
core/jsonmodule containing the lift-json implementation - Updates all imports from
net.liftweb.jsontoorg.json4sacross web and utility modules - Adds json4s dependencies (native, ext, xml) to the project dependencies
- Updates method calls to use json4s equivalents (e.g.,
compactRender→JsonMethods.compact)
Reviewed Changes
Copilot reviewed 87 out of 89 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| project/Dependencies.scala | Adds json4s library dependencies (native, ext, xml) |
| web/webkit/src/main/scala/net/liftweb/http/rest/RestHelper.scala | Updates JSON imports and method calls, fixes field access pattern for json4s |
| web/webkit/src/main/scala/net/liftweb/http/js/JsCommands.scala | Replaces lift-json rendering with json4s JsonMethods |
| web/webkit/src/main/scala/net/liftweb/http/*.scala | Updates JSON imports and method calls across HTTP layer |
| web/testkit/src/main/scala/net/liftweb/mocks/*.scala | Updates JSON imports and rendering methods |
| core/util/src/main/scala/net/liftweb/util/*.scala | Updates JSON imports for utility classes |
| core/json/src/** | Removes entire internal JSON implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| protected def mergeJson(original: JValue, toMerge: JValue): JValue = { | ||
| def replace(lst: List[JField], f: JField): List[JField] = | ||
| f :: lst.filterNot(_.name == f.name) | ||
| f :: lst.filterNot(_._1 == f._1) |
There was a problem hiding this comment.
The field access pattern has changed from .name to ._1 which suggests JField is now treated as a tuple. This change should be verified to ensure it's compatible with json4s JField structure and doesn't break field filtering logic.
| f :: lst.filterNot(_._1 == f._1) | |
| f :: lst.filterNot(_.name == f.name) |
Decommision lift-json in favor of json4s and migrate Lift to the new new.