Serialize/Deserialize custom Map in JacksonDeserializing non-string map keys with JacksonSort a Map<Key, Value> by valuesWhat is object serialization?Sort ArrayList of custom Objects by propertyDeserialize JSON into C# dynamic object?Ignoring new fields on JSON objects using JacksonHow to use Jackson to deserialise an array of objectsHow to tell Jackson to ignore a field during serialization if its value is null?Jackson enum Serializing and DeSerializerJava Serialization/De-serialization giving null object referencesJackson Mixin not working for deserializing non-default constructor object

can i play a electric guitar through a bass amp?

What's the output of a record cartridge playing an out-of-speed record

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

An academic/student plagiarism

How can bays and straits be determined in a procedurally generated map?

Why, historically, did Gödel think CH was false?

Font hinting is lost in Chrome-like browsers (for some languages )

"You are your self first supporter", a more proper way to say it

How old can references or sources in a thesis be?

To string or not to string

What do you call a Matrix-like slowdown and camera movement effect?

Why doesn't H₄O²⁺ exist?

Smoothness of finite-dimensional functional calculus

Why dont electromagnetic waves interact with each other?

Why Is Death Allowed In the Matrix?

What defenses are there against being summoned by the Gate spell?

Can divisibility rules for digits be generalized to sum of digits

Writing rule stating superpower from different root cause is bad writing

What is the offset in a seaplane's hull?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Maximum likelihood parameters deviate from posterior distributions

"to be prejudice towards/against someone" vs "to be prejudiced against/towards someone"

Python: next in for loop



Serialize/Deserialize custom Map in Jackson


Deserializing non-string map keys with JacksonSort a Map<Key, Value> by valuesWhat is object serialization?Sort ArrayList of custom Objects by propertyDeserialize JSON into C# dynamic object?Ignoring new fields on JSON objects using JacksonHow to use Jackson to deserialise an array of objectsHow to tell Jackson to ignore a field during serialization if its value is null?Jackson enum Serializing and DeSerializerJava Serialization/De-serialization giving null object referencesJackson Mixin not working for deserializing non-default constructor object






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








4















I have a pretty simple Map I want to serialize and deserialize in Jackson, but I can't get it to work.



I have tried the following:



@JsonSerialize(keyUsing=TurnKeySerializer.class)
@JsonDeserialize(keyUsing = TurnKeyDeserializer.class)
Map<TurnKey, PlayerTurn> publicTurns = new TreeMap<>();

@JsonIgnoreProperties(ignoreUnknown = true)
@Data //Creates Getter/Setter etc
public class TurnKey implements Comparable<TurnKey> {
private final int turnNumber;
private final String username;

public TurnKey(int turnNumber, String username)
this.turnNumber = turnNumber;
this.username = username;


@Override
public int compareTo(TurnKey o)
int v = Integer.valueOf(turnNumber).compareTo(o.getTurnNumber());
if (v != 0)
return v;

return username.compareTo(o.getUsername());


@Override
public String toString()
return "" +
"turnNumber:" + turnNumber +
", username:'" + username + "'" +
"";



public class TurnKeySerializer extends JsonSerializer<TurnKey>
@Override
public void serialize(TurnKey value, JsonGenerator gen, SerializerProvider serializers) throws IOException, JsonProcessingException
if (null == value)
throw new IOException("Could not serialize object to json, input object to serialize is null");

StringWriter writer = new StringWriter();
ObjectMapper mapper = new ObjectMapper();
mapper.writeValue(writer, value);
gen.writeFieldName(writer.toString());




public class TurnKeyDeserializer extends KeyDeserializer
private static final ObjectMapper mapper = new ObjectMapper();

@Override
public TurnKey deserializeKey(String key, DeserializationContext ctxt) throws IOException, JsonProcessingException
return mapper.readValue(key, TurnKey.class);





But I get an exception



com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token










share|improve this question






















  • Can you explain why you are using a custom (de)serializer for TurnKey? Have you tried it without?

    – Tom
    Nov 15 '15 at 21:03











  • Is the serialized json ok?

    – Tom
    Nov 15 '15 at 21:05











  • @Tom Because you are required. Otherwise Jackson cannot map. I tried without first, that what led me to this. I am only getting error on deserialization, so I believe so. The toString() looks correct to me at least

    – Shervin Asgari
    Nov 16 '15 at 6:58







  • 2





    Well I do get an exception if I use the TurnKey withouth any serializer/deserializer. Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584)

    – Shervin Asgari
    Nov 18 '15 at 19:55







  • 1





    Maps with non-string keys do need custom deseriizers. But serialisation of such maps will simply call the toString method of the key object. Check that what is in the serialised json is what you expect as input. You may also use that json key with a repository object to fetch a new object from the db

    – Japheth Ongeri - inkalimeva
    Jul 7 '16 at 11:29

















4















I have a pretty simple Map I want to serialize and deserialize in Jackson, but I can't get it to work.



I have tried the following:



@JsonSerialize(keyUsing=TurnKeySerializer.class)
@JsonDeserialize(keyUsing = TurnKeyDeserializer.class)
Map<TurnKey, PlayerTurn> publicTurns = new TreeMap<>();

@JsonIgnoreProperties(ignoreUnknown = true)
@Data //Creates Getter/Setter etc
public class TurnKey implements Comparable<TurnKey> {
private final int turnNumber;
private final String username;

public TurnKey(int turnNumber, String username)
this.turnNumber = turnNumber;
this.username = username;


@Override
public int compareTo(TurnKey o)
int v = Integer.valueOf(turnNumber).compareTo(o.getTurnNumber());
if (v != 0)
return v;

return username.compareTo(o.getUsername());


@Override
public String toString()
return "" +
"turnNumber:" + turnNumber +
", username:'" + username + "'" +
"";



public class TurnKeySerializer extends JsonSerializer<TurnKey>
@Override
public void serialize(TurnKey value, JsonGenerator gen, SerializerProvider serializers) throws IOException, JsonProcessingException
if (null == value)
throw new IOException("Could not serialize object to json, input object to serialize is null");

StringWriter writer = new StringWriter();
ObjectMapper mapper = new ObjectMapper();
mapper.writeValue(writer, value);
gen.writeFieldName(writer.toString());




public class TurnKeyDeserializer extends KeyDeserializer
private static final ObjectMapper mapper = new ObjectMapper();

@Override
public TurnKey deserializeKey(String key, DeserializationContext ctxt) throws IOException, JsonProcessingException
return mapper.readValue(key, TurnKey.class);





But I get an exception



com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token










share|improve this question






















  • Can you explain why you are using a custom (de)serializer for TurnKey? Have you tried it without?

    – Tom
    Nov 15 '15 at 21:03











  • Is the serialized json ok?

    – Tom
    Nov 15 '15 at 21:05











  • @Tom Because you are required. Otherwise Jackson cannot map. I tried without first, that what led me to this. I am only getting error on deserialization, so I believe so. The toString() looks correct to me at least

    – Shervin Asgari
    Nov 16 '15 at 6:58







  • 2





    Well I do get an exception if I use the TurnKey withouth any serializer/deserializer. Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584)

    – Shervin Asgari
    Nov 18 '15 at 19:55







  • 1





    Maps with non-string keys do need custom deseriizers. But serialisation of such maps will simply call the toString method of the key object. Check that what is in the serialised json is what you expect as input. You may also use that json key with a repository object to fetch a new object from the db

    – Japheth Ongeri - inkalimeva
    Jul 7 '16 at 11:29













4












4








4


1






I have a pretty simple Map I want to serialize and deserialize in Jackson, but I can't get it to work.



I have tried the following:



@JsonSerialize(keyUsing=TurnKeySerializer.class)
@JsonDeserialize(keyUsing = TurnKeyDeserializer.class)
Map<TurnKey, PlayerTurn> publicTurns = new TreeMap<>();

@JsonIgnoreProperties(ignoreUnknown = true)
@Data //Creates Getter/Setter etc
public class TurnKey implements Comparable<TurnKey> {
private final int turnNumber;
private final String username;

public TurnKey(int turnNumber, String username)
this.turnNumber = turnNumber;
this.username = username;


@Override
public int compareTo(TurnKey o)
int v = Integer.valueOf(turnNumber).compareTo(o.getTurnNumber());
if (v != 0)
return v;

return username.compareTo(o.getUsername());


@Override
public String toString()
return "" +
"turnNumber:" + turnNumber +
", username:'" + username + "'" +
"";



public class TurnKeySerializer extends JsonSerializer<TurnKey>
@Override
public void serialize(TurnKey value, JsonGenerator gen, SerializerProvider serializers) throws IOException, JsonProcessingException
if (null == value)
throw new IOException("Could not serialize object to json, input object to serialize is null");

StringWriter writer = new StringWriter();
ObjectMapper mapper = new ObjectMapper();
mapper.writeValue(writer, value);
gen.writeFieldName(writer.toString());




public class TurnKeyDeserializer extends KeyDeserializer
private static final ObjectMapper mapper = new ObjectMapper();

@Override
public TurnKey deserializeKey(String key, DeserializationContext ctxt) throws IOException, JsonProcessingException
return mapper.readValue(key, TurnKey.class);





But I get an exception



com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token










share|improve this question














I have a pretty simple Map I want to serialize and deserialize in Jackson, but I can't get it to work.



I have tried the following:



@JsonSerialize(keyUsing=TurnKeySerializer.class)
@JsonDeserialize(keyUsing = TurnKeyDeserializer.class)
Map<TurnKey, PlayerTurn> publicTurns = new TreeMap<>();

@JsonIgnoreProperties(ignoreUnknown = true)
@Data //Creates Getter/Setter etc
public class TurnKey implements Comparable<TurnKey> {
private final int turnNumber;
private final String username;

public TurnKey(int turnNumber, String username)
this.turnNumber = turnNumber;
this.username = username;


@Override
public int compareTo(TurnKey o)
int v = Integer.valueOf(turnNumber).compareTo(o.getTurnNumber());
if (v != 0)
return v;

return username.compareTo(o.getUsername());


@Override
public String toString()
return "" +
"turnNumber:" + turnNumber +
", username:'" + username + "'" +
"";



public class TurnKeySerializer extends JsonSerializer<TurnKey>
@Override
public void serialize(TurnKey value, JsonGenerator gen, SerializerProvider serializers) throws IOException, JsonProcessingException
if (null == value)
throw new IOException("Could not serialize object to json, input object to serialize is null");

StringWriter writer = new StringWriter();
ObjectMapper mapper = new ObjectMapper();
mapper.writeValue(writer, value);
gen.writeFieldName(writer.toString());




public class TurnKeyDeserializer extends KeyDeserializer
private static final ObjectMapper mapper = new ObjectMapper();

@Override
public TurnKey deserializeKey(String key, DeserializationContext ctxt) throws IOException, JsonProcessingException
return mapper.readValue(key, TurnKey.class);





But I get an exception



com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token







java serialization jackson deserialization






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '15 at 20:20









Shervin AsgariShervin Asgari

15k2580128




15k2580128












  • Can you explain why you are using a custom (de)serializer for TurnKey? Have you tried it without?

    – Tom
    Nov 15 '15 at 21:03











  • Is the serialized json ok?

    – Tom
    Nov 15 '15 at 21:05











  • @Tom Because you are required. Otherwise Jackson cannot map. I tried without first, that what led me to this. I am only getting error on deserialization, so I believe so. The toString() looks correct to me at least

    – Shervin Asgari
    Nov 16 '15 at 6:58







  • 2





    Well I do get an exception if I use the TurnKey withouth any serializer/deserializer. Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584)

    – Shervin Asgari
    Nov 18 '15 at 19:55







  • 1





    Maps with non-string keys do need custom deseriizers. But serialisation of such maps will simply call the toString method of the key object. Check that what is in the serialised json is what you expect as input. You may also use that json key with a repository object to fetch a new object from the db

    – Japheth Ongeri - inkalimeva
    Jul 7 '16 at 11:29

















  • Can you explain why you are using a custom (de)serializer for TurnKey? Have you tried it without?

    – Tom
    Nov 15 '15 at 21:03











  • Is the serialized json ok?

    – Tom
    Nov 15 '15 at 21:05











  • @Tom Because you are required. Otherwise Jackson cannot map. I tried without first, that what led me to this. I am only getting error on deserialization, so I believe so. The toString() looks correct to me at least

    – Shervin Asgari
    Nov 16 '15 at 6:58







  • 2





    Well I do get an exception if I use the TurnKey withouth any serializer/deserializer. Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584)

    – Shervin Asgari
    Nov 18 '15 at 19:55







  • 1





    Maps with non-string keys do need custom deseriizers. But serialisation of such maps will simply call the toString method of the key object. Check that what is in the serialised json is what you expect as input. You may also use that json key with a repository object to fetch a new object from the db

    – Japheth Ongeri - inkalimeva
    Jul 7 '16 at 11:29
















Can you explain why you are using a custom (de)serializer for TurnKey? Have you tried it without?

– Tom
Nov 15 '15 at 21:03





Can you explain why you are using a custom (de)serializer for TurnKey? Have you tried it without?

– Tom
Nov 15 '15 at 21:03













Is the serialized json ok?

– Tom
Nov 15 '15 at 21:05





Is the serialized json ok?

– Tom
Nov 15 '15 at 21:05













@Tom Because you are required. Otherwise Jackson cannot map. I tried without first, that what led me to this. I am only getting error on deserialization, so I believe so. The toString() looks correct to me at least

– Shervin Asgari
Nov 16 '15 at 6:58






@Tom Because you are required. Otherwise Jackson cannot map. I tried without first, that what led me to this. I am only getting error on deserialization, so I believe so. The toString() looks correct to me at least

– Shervin Asgari
Nov 16 '15 at 6:58





2




2





Well I do get an exception if I use the TurnKey withouth any serializer/deserializer. Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584)

– Shervin Asgari
Nov 18 '15 at 19:55






Well I do get an exception if I use the TurnKey withouth any serializer/deserializer. Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584)

– Shervin Asgari
Nov 18 '15 at 19:55





1




1





Maps with non-string keys do need custom deseriizers. But serialisation of such maps will simply call the toString method of the key object. Check that what is in the serialised json is what you expect as input. You may also use that json key with a repository object to fetch a new object from the db

– Japheth Ongeri - inkalimeva
Jul 7 '16 at 11:29





Maps with non-string keys do need custom deseriizers. But serialisation of such maps will simply call the toString method of the key object. Check that what is in the serialised json is what you expect as input. You may also use that json key with a repository object to fetch a new object from the db

– Japheth Ongeri - inkalimeva
Jul 7 '16 at 11:29












1 Answer
1






active

oldest

votes


















1














You need to define/override the fromString() method in TurnKey. Jackson will use toString() to serialize and fromString() to deserialize. That's what "Can not find a (Map) Key deserializer" means in the error message Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584).



A custom KeyDeserializer is not needed.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33724568%2fserialize-deserialize-custom-mapkey-object-in-jackson%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You need to define/override the fromString() method in TurnKey. Jackson will use toString() to serialize and fromString() to deserialize. That's what "Can not find a (Map) Key deserializer" means in the error message Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584).



    A custom KeyDeserializer is not needed.






    share|improve this answer





























      1














      You need to define/override the fromString() method in TurnKey. Jackson will use toString() to serialize and fromString() to deserialize. That's what "Can not find a (Map) Key deserializer" means in the error message Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584).



      A custom KeyDeserializer is not needed.






      share|improve this answer



























        1












        1








        1







        You need to define/override the fromString() method in TurnKey. Jackson will use toString() to serialize and fromString() to deserialize. That's what "Can not find a (Map) Key deserializer" means in the error message Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584).



        A custom KeyDeserializer is not needed.






        share|improve this answer















        You need to define/override the fromString() method in TurnKey. Jackson will use toString() to serialize and fromString() to deserialize. That's what "Can not find a (Map) Key deserializer" means in the error message Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not find a (Map) Key deserializer for type [simple type, class no.asgari.civilization.server.model.TurnKey] at com.fasterxml.jackson.databind.deser.DeserializerCache._handleUnknownKeyDeserializer(DeserializerCache.java:584).



        A custom KeyDeserializer is not needed.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 8 at 3:57

























        answered Mar 8 at 3:52









        JeanieJJeanieJ

        11418




        11418





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33724568%2fserialize-deserialize-custom-mapkey-object-in-jackson%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved