Seems that simply https://github.com/hseeberger/akka-http-json/pull/757 could be cherry-picked (as noted in https://github.com/hseeberger/akka-http-json/issues/755).