V
V
Vampre2019-08-23 02:22:54
Java
Vampre, 2019-08-23 02:22:54

Is it possible to make a dict python analog in Java?

Do I understand correctly that in Java without installing third-party libraries it is impossible to create an object of the form

{
    "key1": {
        "key2": "value2"
    },
    "key3": "value3"
}

because the value of the key can be either a string or a Map, or can generics be used somehow here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-08-23
@zagayevskiy

Map<String, Object>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question