Giter Club home page Giter Club logo

mapneat's Introduction

mapneat's People

Contributors

deepsourcebot avatar dependabot-preview[bot] avatar eugene-cheverda avatar nomemory avatar reidweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mapneat's Issues

CVE-2020-3651

I believe MapNeat is affected by CVE-2020-3651 because its Jackson dependency is affected by this vulnerability.

dependencies {
    implementation "com.fasterxml.jackson.core:jackson-databind:2.12.0-rc1"
}

Mitigation

According to the GitHub Issue on this vulnerability, upgrading to 2.12.6.1 will fix the problem.

dependencies {
    implementation "com.fasterxml.jackson.core:jackson-databind:2.12.6.1"
}

Copy Question

Is there a way to copy array of objects while excluding certain fields? For example for an input:

{
  "liveEvent" : [ {
    "liveEventGuid" : "9885d3d8-4ad7-a4a8-0498-3c10b75c9fae",
    "airings" : {
      "airing" : [ {
        "channelId" : "9235",
        "duration" : 0,
        "liveEpisodeMarkerGuid" : "5bcd2046-d610-7a4e-7a9f-0a0c11726ee6",
        "bias" : "2",
        "satelliteOnlyChannel" : false,
        "source" : "IP",
        "platform" : "IP"
      }, {
        "channelId" : "9252",
        "duration" : 0,
        "liveEpisodeMarkerGuid" : "355aa224-eefc-5383-8297-09777e12ae0b",
        "bias" : "1",
        "satelliteOnlyChannel" : false,
        "source" : "IP",
        "platform" : "IP"
      }]
    },
    "updatedAt" : "2021-09-03T18:43:50.235470700Z",
    "contextualBanners" : [ "2nd Inning" ]
  } ]
}

I would copy all the liveEvent array like this:

"liveEvent" *= "$.liveEvent[*]"

which works but i would like to exclude the airings field...i presume i'll be using the below notation but I'm not sure what to put in the processor parameter:

"liveEvent" *= {
  expression = "$.liveEvent[*]"
  processor = { 
    // what do i put here to exclude airings field?
 }

The examples I'm seeing is using expressions that return list of ints or String, but in this case the list is an object (with no pre-defined POJO).

Why no duplicates?

I'm looking for json to json transformers for a translation layer between different schemas, one of which I do not own. Obviously a good use case for your library which looks awesome :)

In general, duplicates are annoying, and if I'm merging from multiple sources into the same target it's possible it'll create a bug. However, JSON allows for duplicates and if there are duplicates in the source I should certainly honor that.

I'm struggling to come up with a well formed schema that leads to such, but I can think of real world examples of less than pretty data.

Sometimes you run into associated arrays

{
"ratings_providers": [ "a", "b", "c" ],
"ratings": [ 5, 5, 4.5 ]
}

Not my favorite but I've seen it and I may have to merge into it. I'm not sure what other cases I might have. It may be best if I run into them and then bring them back but if they are in the source that might cause a production bug...

Thoughts? Could we turn it on or off as optional parameters to the json object constructor?

Please provide possibility to update JsonPath configuration options

When accessing missing property in supplied json JsonPath throws an exception. There is an option com.jayway.jsonpath.Option.SUPPRESS_EXCEPTIONS that we would like to use in JsonPath configuration, but there is no means to update JsonPath configuration in the library.

Question on copying entire source JSON

hello!

i am currently evaluating this library for transformation and kindly excuse me for this embarrassingly stupid question: how do you you copy the entire original JSON from src to target? the use case that i have is that i want to copy the entire doc but just add a few fields.

the example input:

{
  "hello": "world"
}

and this transformation:

fun copySourceDoc(input: String): String {
  return json(input) {
    "." *= "$"
   // ... do other transformation stuff here
  }.getPrettyString()
}

results in:

{
  "" : {
    "" : {
      "hello" : "world"
    }
  }
}

i mean, i would assume that there is some flag/parameter that you can use to copy the source by default so i don't even have to explicitly copy it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.