Soumya Naidu
Soumya Naidu

Reputation: 1

The method getFields() is undefined for the type JsonNode

I'm new to Java. I had to replace the reference to org.codehaus.jackson.JsonNode library with com.fasterxml.jackson.databind.JsonNode to resolve security vulnerabilities. Now, I'm getting the above error.

private static String convertColumnsNamesToFieldNames(SFObjectModel model, JsonNode node,
        HashMap<String, String> aliasMap) {
    Iterator<Entry<String, JsonNode>> iter = node.getFields();

Do you know what the equivalent is in the new library?

I tried the fields() method and the error went away, but I really don't know if this is correct. Could someone confirm if this will work.

Upvotes: -2

Views: 276

Answers (1)

Diego Borba
Diego Borba

Reputation: 2407

You should use com.fasterxml.jackson.databind.JsonNode.fields()

Upvotes: 1

Related Questions