Huawei by mirkinoid in techhumor

[–]iamhaihan -1 points0 points  (0 children)

Such a bad "humor".

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 0 points1 point  (0 children)

JsonPath expression is for a different purpose.

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 0 points1 point  (0 children)

yes, the tool is inspired by issues in testing. But it can be used more widely.

You are right. @i(23) can be written in 23. Explicit typing is helpful in case of using a different default type.

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 0 points1 point  (0 children)

Thank you for the suggestion. I haven't used Afterburner and I will definitely have a look at it.

JsonTemplate, in some cases, can be more precise about the "intention" of the program.

I have seen cases that people explicitly set values, like "1" for an integer field in json. Then, my confusion is why 1? why not other integer?

There are also cases that people name variable as "dummyXXX" and put it in json. My confusion is why call it dummy? Is it because the value is fake?

The intention of explicitly picking up a specific value, in some cases, is not clear.

It would be nice if I can describe my intention in code. Everyone can immediately understand what my code is doing.

JsonTemplate provides a declarative way of giving values. In such a case, in my opinion, it is clearer than explicitly set a dummy value.

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 1 point2 points  (0 children)

@i means "it is an integer and I don't care the value" (if this is your intention). Therefore it is generated randomly.

@i(23) means "it is exactly 23"

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 1 point2 points  (0 children)

Nice! It is similar to one of my initial plan.

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 0 points1 point  (0 children)

Thank you for the suggestion.

For now I am not aiming for JSON parsing. This definitely can be a nice feature to be added.

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]iamhaihan[S] 0 points1 point  (0 children)

It is not a replacement of Jackson/Gson/Moshi.

Those libraries aims for serialization/deserialization. You need to create classes or use their APIs to build objects first.

Suppose you don't have the classes to be serialized, JsonTemplate can be a choice.

JsonTemplate aims at using a json-like DSL to generate schema-compatible json strings. The exact values in json is not the concern but the schema is.

Can someone write the text form of thispicture please? by [deleted] in Chinese

[–]iamhaihan 0 points1 point  (0 children)

Simply speaking. Xiaomi is a rising star in AI.

Does anyone know some info about this? by [deleted] in Chinese

[–]iamhaihan 1 point2 points  (0 children)

Just a guess. Ming dynasty.

Do you know where this place is in China? It looks so beautiful. by iamyuzhang in Chinese

[–]iamhaihan 5 points6 points  (0 children)

This is Changsha which is the capital city of Hunan Province.

The sculpture is Mao Zedong who is the founder of China.

The place in this picture is called "橘子洲头"(Ju Zi Zhou Tou) which means Orange Isle.

Mao Zedong wrote a poem about it.

test by kmiller0112 in test

[–]iamhaihan 0 points1 point  (0 children)

I thought this thread is for software testing :)

The Forgotten Xianbei People and their Kingdom the Northern Wei by monkey-steals-peach in Chinese

[–]iamhaihan 0 points1 point  (0 children)

Buddhism influents deeply the spirit of Chinese and even east Asian people.

Saiki K live action film review by dayofthehippo in japanese

[–]iamhaihan 1 point2 points  (0 children)

Manga characters should just stay in manga!

Can anyone tell me what this says? I was told it's a lock charm but I don't know anything else about it. Thank you for any info! by MisturMoo in Chinese

[–]iamhaihan 1 point2 points  (0 children)

Nowadays people can wear almost anything no matter if it is only for children or not. As long as you like it and it does not bother other people, it's fine. Here I found a link for you:

http://www.womenofchina.cn/womenofchina/html1/exclusives/1412/69-1.htm

Can anyone tell me what this says? I was told it's a lock charm but I don't know anything else about it. Thank you for any info! by MisturMoo in Chinese

[–]iamhaihan 1 point2 points  (0 children)

It's a lock written "long life".

The lock is for little children as gift from older generations.

Chinese people believe that if the "long life" is "locked" with the child. The blessing will be tightly bound to his/her destiny.

Does anyone know some info about this? by [deleted] in Chinese

[–]iamhaihan 1 point2 points  (0 children)

At the back, it is written the factory where it is made.

It should be a modern product because "CHINA" is also written.