Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
Can anyone recommend the best way to calculate the diff between two objects in a way that can be applied to generate either object from the other?

Assume I have two different complex objects, a and b, which can each contain other objects or arrays. I want to get the diff of a and b in a way that I can 'apply' that patch to a to get b, or 'apply it in reverse' to b to get a. In other words, I want to be able to make a round trip, no matter how complex either object.

The reason I need this is that I want to be able to return to the various states of a record in a database over time. Every time the record changes, I want to store a patch, and I want to be able to play through the patches forward or backward to get to any previous state of that record.

Any help would be greatly appreciated.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda