2016-03-29 13 views
0

ben eklemek farklı veriler için json yanıtları var ve JSON biçiminde onları.JSON'dan özel karakterler nasıl çözülür. (Örneğin, "'" için "'") Benim CMS

ie.

[{"id":"7","image":"vangal.jpe","name":"Louis Van Gaal","nationality":"Dutch","managed_from":"14 July 2014", 
"article":"Louis van Gaal arrived at Manchester United with an outstanding record of success first in his native Netherlands and subsequently at some of the biggest clubs in the world.\r\n\r\nAs a manager he has won league titles in three different countries, guided a youthful Ajax side to UEFA Champions League glory, as well as lifting the UEFA Cup. His second stint in charge of the Dutch national team ended with the Netherlands making the semi-finals of the 2014 World Cup, a run which included a magnificent 5-1 win over holders Spain.\r\n\r\nBorn Aloysius Paulus Maria van Gaal in Amsterdam on 8 August 1951, he joined Ajax aged 20 and while he never played for the great Dutch club's first team, the influence of the time he spent immersed in its culture of Total Football has never left him.\r\n\r\nHe cut his teeth at professional level after moving over the border to Royal Antwerp in Belgium, but following four years there he returned to Holland to complete his playing career, briefly at Telstar, then for eight years at Sparta Rotterdam before retiring after a short stint at AZ.\r\n\r\nVan Gaal remained at AZ to begin a coaching and management career where the characteristics of fluent passing, talented youngsters being given a chance and canny tactics through a high attention to detail have remained to great effect at the highest level of the global game.\r\n\r\nAfter leaving AZ, van Gaal's coaching education continued under the legendary Leo Beenhakker at Ajax, who he succeeded as first team boss in 1991. The club's fortunes had dipped since the golden era of the 1970s, but under van Gaal Ajax secured three consecutive Eredivisie titles and the UEFA Cup. But more importantly they delivered European Cup success, in its new guise as the Champions League, returning the trophy to the club for the first time in over 20 years.\r\n\r\nA side containing future United star Edwin van der Sar, the De Boer brothers, Frank Rijkaard, Edgar Davids, Clarence Seedorf, Marc Overmars and Patrick Kluivert overcame AC Milan in Vienna, and after this success it was inevitable that van Gaal would be linked with some of the biggest clubs in Europe. He eventually succeeded Bobby Robson at Barcelona in 1997, and after inheriting a set-up that included Jose Mourinho on the coaching staff, his new side won La Liga in his first season in charge, retaining the title the following year.\r\n\r\nWhile at Barca, van Gaal had the first of four meetings with United in the Champions League, handing an 18-year-old Xavi his European debut during the 3-3 draw at Old Trafford. The first goalscorer that night? Ryan Giggs.\r\n\r\nVan Gaal then had spells in charge of the Dutch national side and the Catalan giants again, and following a brief time at Ajax as technical director he returned to AZ and guided them to the Dutch title in 2009.\r\n\r\nThis dramatic success led to Bayern Munich recruiting him, and van Gaal became the first Dutch manager to win the Bundesliga, claiming a league title in his debut season in charge at a club for the second time β something Reds fans would love to see him do again at United.\r\n\r\nA second Champions League final for van Gaal, in 2010, ended in defeat to an Inter Milan side managed by former assistant Mourinho, and after leaving Bayern he took up the reins of the Dutch national side once again and successfully steered them through to the 2014 World Cup finals. The Netherlands won the third place play-off with a 3-0 win over hosts Brazil, but just a few days later van Gaal was officially unveiled in Manchester to begin the next chapter of an already stellar career.\r\n\r\nHis announcement as the next United manager, the club's first continental coach to take charge of the first team, arrived on 19 May 2014. Ryan Giggs was announced as his assistant manager, while assistant coaches Albert Stuivenberg, Frans Hoek (specialising with goalkeepers) and Marcel Bout (focusing on opposition scouting), training physiologist Jos van Dijk and performance analyst Max Reckers also joined a new-look backroom team at Old Trafford.\r\n\r\nVan Gaal, who eventually started work at United on 14 July 2014, said: "It was always a wish for me to work in the Premier League. To work as a manager for Manchester United, the biggest club in the world, makes me very proud. I have managed in games at Old Trafford before and know what an incredible arena it is and how passionate and knowledgeable the fans are. This club has big ambitions; I too have big ambitions. Together I'm sure we will make history.""}] 

Bu durumda, içinde bir metin bulunan basit bir JSON Array'ım var. Ancak, ben ' bir ve '' gibi bu metnin bazı karakterleri okuyamaz. Umarım aşağıdaki ekran görüntüsünden görebilirsiniz.

my screenshot

nasıl karakterleri ' s alabilir

? Gerçekten çok çirkin ve okumak zor görünüyor.

Τhanks. JSON Sağlanan

+0

html dize gibi görünüyor. Metni html metni olarak ayarla, 'tv.setText (Html.fromHtml (" text "))', replace() yöntemini kullanmaya gerek yoktur. –

+0

JSON 'içinde' 'dize dizgileri' \ "' kullanarak veya unicode editörleri kullanılarak çıkarılmalıdır. Ayrıca, görünüm bileşeninize giden yolda bir yerde, HTML karakter alıntılarının yer alması, HTML karakter öğelerinin dizeye eklenmesi gibi görünmektedir. [Html.fromHtml()] (http://developer.android.com/reference/android/text/Html.html#fromHtml%28java.lang.String%29) sizin için bunları halledebilir. Ancak, ilk başta oraya nasıl ulaştıklarını öğrenmek de muhtemelen faydalıdır. – dhke

cevap

1

Kullanımı;

+0

Teşekkürler efendim. O kadar kolaydı! – Theo

+0

@Theo Eğer yardımcı olsaydı, lütfen bunu doğru cevap olarak kabul edin. Başkalarına da yardımcı olabilir. :) – lal

+0

Ooops. Afedersiniz! Unuttum! – Theo

0

yanlıştır, ilk http://jsonlint.com/ kullanarak ayrıştırmak deneyin. Ben doğru anlamak

, sen ' ve " karşı geldik. Bunun yerine \' ve \" kullanmayı deneyin. Aşağıdaki

myTextView.setText (Html.fromHtml ("Burada ur metin")) gibi

0

Cevaplar için teşekkürler! lal kullanıcısı sayesinde sorun giderildi.

myTextView.setText(Html.fromHtml("ur text here")); 
İlgili konular