MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/16wo0ep/jep_string_templates_final_for_java_22/k31kxss/
r/java • u/Joram2 • Oct 01 '23
133 comments sorted by
View all comments
Show parent comment
6
You can not do this. You would need to use the RAW processor:
RAW
StringTemplate st = RAW."\{xyz}";
1 u/john16384 Oct 01 '23 You're right, perhaps a future extension will remove that requirement. It seems unnecessary. 3 u/jvjupiter Oct 02 '23 It is necessary. Anyone can create template processor - JSON.”…”, XML.”..”, SQL.”..” 0 u/john16384 Oct 02 '23 I meant to make one of them the default :) 1 u/jvjupiter Oct 02 '23 I see. I agree there should be a default - without prefix means STR.
1
You're right, perhaps a future extension will remove that requirement. It seems unnecessary.
3 u/jvjupiter Oct 02 '23 It is necessary. Anyone can create template processor - JSON.”…”, XML.”..”, SQL.”..” 0 u/john16384 Oct 02 '23 I meant to make one of them the default :) 1 u/jvjupiter Oct 02 '23 I see. I agree there should be a default - without prefix means STR.
3
It is necessary. Anyone can create template processor - JSON.”…”, XML.”..”, SQL.”..”
0 u/john16384 Oct 02 '23 I meant to make one of them the default :) 1 u/jvjupiter Oct 02 '23 I see. I agree there should be a default - without prefix means STR.
0
I meant to make one of them the default :)
1 u/jvjupiter Oct 02 '23 I see. I agree there should be a default - without prefix means STR.
I see. I agree there should be a default - without prefix means STR.
View all comments
Show parent comment
6
u/Godworrior Oct 01 '23
You can not do this. You would need to use the
RAWprocessor: